Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
bb0fbb6
Abilities API: Add a core/content ability
jorgefilipecosta Jun 16, 2026
7c3854c
Abilities API: apply core/settings review feedback to core/content.
jorgefilipecosta Jun 17, 2026
8b8dba6
Abilities API: make WP_Content_Abilities a final instance class.
jorgefilipecosta Jun 23, 2026
aa68c4d
Abilities API: model the core/content input as two mutually exclusive…
jorgefilipecosta Jun 23, 2026
5de5def
Abilities API: Require edit access for content ability
jorgefilipecosta Jun 23, 2026
2364056
Abilities API: Align content input schema defaults
jorgefilipecosta Jun 23, 2026
8f81839
Abilities API: Expose readable content fields
jorgefilipecosta Jun 24, 2026
cd08d81
Tests: Update content ability REST permissions
jorgefilipecosta Jun 24, 2026
96606d5
Abilities API: Address content review follow-ups
jorgefilipecosta Jun 24, 2026
f3db5e7
Abilities API: Rename content read ability
jorgefilipecosta Jun 29, 2026
e7580d3
Abilities API: Split read content modes
jorgefilipecosta Jun 29, 2026
ef63588
Tests: Cover read content ability modes
jorgefilipecosta Jun 29, 2026
1bffcb0
Abilities API: Sync read content ability with plugin
jorgefilipecosta Jul 10, 2026
1a9ccfc
Abilities API: Clarify readable content exposure
jorgefilipecosta Jul 10, 2026
7b0ea31
Abilities API: Sync content query ability with plugin
jorgefilipecosta Oct 5, 2026
4c9ddb1
Abilities API: Use the public meta flag for the content query ability
jorgefilipecosta Oct 5, 2026
2817c4a
Abilities API: Update the content query ability since tags to 7.2.0
jorgefilipecosta Oct 5, 2026
43c045b
Abilities API: Drop hook name phpcs ignores from the content query ab…
jorgefilipecosta Oct 5, 2026
fde188b
Tests: Add assertion messages to the content query REST tests
jorgefilipecosta Oct 5, 2026
1d49488
Tests: Stop popping the faked init actions in content query tests
jorgefilipecosta Oct 5, 2026
c950707
Tests: Rely on the test case to reset content query post types
jorgefilipecosta Oct 5, 2026
874b5ae
Abilities API: Use the multi-line comment format in the content query…
jorgefilipecosta Oct 5, 2026
0039318
Abilities API: Unset no_found_rows in the content query count query
jorgefilipecosta Oct 5, 2026
7961459
Tests: Add the Trac ticket to the content query tests
jorgefilipecosta Oct 5, 2026
f371db9
Tests: Unregister the content category after each content query test
jorgefilipecosta Oct 5, 2026
10204d3
Abilities API: Drop post_type_cap() from the content query ability
jorgefilipecosta Oct 6, 2026
95df88a
Abilities API: Share the post and post type lookups in the content qu…
jorgefilipecosta Oct 6, 2026
5ae92cb
Abilities API: Filter and return the author by slug in the content qu…
jorgefilipecosta Oct 6, 2026
4ea65b0
Abilities API: Return an empty rendered title when a title filter ret…
jorgefilipecosta Oct 6, 2026
9f49705
Abilities API: Restore the hooks the content REST tests change to reg…
jorgefilipecosta Oct 6, 2026
1bf9553
Abilities API: Look up an exposed post type directly in the content q…
jorgefilipecosta Oct 6, 2026
f24f25b
Abilities API: Say that editors can tell whether an author slug exists
jorgefilipecosta Oct 6, 2026
0ff14b5
Abilities API: Stop citing the author filter in parse_filter_int()'s …
jorgefilipecosta Oct 6, 2026
7d6bed4
Abilities API: Document `show_in_abilities` as a boolean
jorgefilipecosta Oct 7, 2026
a2120ea
Abilities API: Prime the caches that permalinks read in the content q…
jorgefilipecosta Oct 7, 2026
07aca57
Abilities API: Update the content query comments on string input
jorgefilipecosta Oct 7, 2026
6b98d23
Abilities API: Align the `@param` tags in the content query ability
jorgefilipecosta Oct 7, 2026
cfcefb9
Abilities API: Drop the `open_world` annotation from the content quer…
jorgefilipecosta Oct 7, 2026
937d4d2
Tests: Count only the callback's queries in the content query tests o…
jorgefilipecosta Oct 7, 2026
1f23fda
Abilities API: Restore every loop global after rendering content quer…
jorgefilipecosta Oct 7, 2026
4ab65ff
Abilities API: Describe author slugs without `core/users-query`
jorgefilipecosta Oct 7, 2026
540777c
Abilities API: Hide users of other sites from the author slug filter …
jorgefilipecosta Oct 7, 2026
af84171
Abilities API: Stop naming a future `core/manage-content` ability
jorgefilipecosta Oct 7, 2026
1257e38
Abilities API: Document duplicate slugs in hierarchical post types
jorgefilipecosta Oct 7, 2026
61b8f7d
Abilities API: Use early exits in the content query loop global helpers
jorgefilipecosta Oct 7, 2026
5630f69
Abilities API: Prime parent caches in the content query ability
jorgefilipecosta Oct 7, 2026
4a2bfd5
Tests: Cover the editor password bypass for generated content query e…
jorgefilipecosta Oct 7, 2026
213cfc8
Tests: Follow Core conventions in the content query tests
jorgefilipecosta Oct 7, 2026
0cd440f
Abilities API: Tidy the content query ability class
jorgefilipecosta Oct 7, 2026
ed64c06
Abilities API: Simplify the content query ability
jorgefilipecosta Oct 7, 2026
e632c7a
Abilities API: Set up each content query post once while formatting it
jorgefilipecosta Oct 7, 2026
7a588f1
Abilities API: Accept a single ID in the content query include filter
jorgefilipecosta Oct 7, 2026
9072ba5
Abilities API: Simplify the content query errors and page count
jorgefilipecosta Oct 7, 2026
6153542
Abilities API: Add since notes for the content query ability
jorgefilipecosta Oct 7, 2026
cf05f86
Tests: Reset the post types after each content query test
jorgefilipecosta Oct 7, 2026
08257b9
Tests: Tidy the content query tests
jorgefilipecosta Oct 7, 2026
3036ae7
Tests: Use Trac ticket 66268 in the content query tests
jorgefilipecosta Oct 7, 2026
219f236
Abilities API: Save the content query loop globals by value
jorgefilipecosta Oct 7, 2026
922d116
Tests: Cover the content query post context and author priming
jorgefilipecosta Oct 7, 2026
155499e
Abilities API: Document `show_in_abilities` for all content abilities
jorgefilipecosta Oct 7, 2026
35b46e6
Abilities API: Explain the content query string input in one place
jorgefilipecosta Oct 7, 2026
9fd554c
Abilities API: Honor whole-number `page` and `per_page` in the conten…
jorgefilipecosta Oct 7, 2026
4628300
Abilities API: Keep the setup of a global post that was not set up
jorgefilipecosta Oct 7, 2026
1fe5ee9
Abilities API: Rename the content class to `WP_Abilities_Content`
jorgefilipecosta Oct 8, 2026
a862cfa
Abilities API: Address review feedback on the content query
jorgefilipecosta Oct 8, 2026
12c5097
Abilities API: Align the content query docs with the sibling abilities
jorgefilipecosta Oct 8, 2026
e9ae497
Abilities API: Address further review feedback on the content query
jorgefilipecosta Oct 9, 2026
85f803c
Abilities API: Keep the `core/content-query` callbacks private.
jorgefilipecosta Oct 9, 2026
d95f2e9
Abilities API: Stop describing every other core ability as a closure.
jorgefilipecosta Oct 12, 2026
00349ab
Abilities API: Drop two redundant checks from `core/content-query`.
jorgefilipecosta Oct 15, 2026
4d7c33b
Abilities API: Move the `core/content-query` input into `where` and `…
jorgefilipecosta Oct 13, 2026
557a815
Tests: Update the `core/content-query` tests for the `where` and `pag…
jorgefilipecosta Oct 13, 2026
8785a0b
Abilities API: Flatten `where` in the `core/content-query` input.
jorgefilipecosta Oct 14, 2026
215ced9
Tests: Update the `core/content-query` tests for the flat `where`.
jorgefilipecosta Oct 14, 2026
4acab2d
Abilities API: Return every listed post on the first page in `core/co…
jorgefilipecosta Oct 14, 2026
dda3741
Tests: Cover the `core/content-query` page size for `ids` and `slugs`.
jorgefilipecosta Oct 14, 2026
283082c
Abilities API: Stop leaving readable posts out of `core/content-query`.
jorgefilipecosta Oct 15, 2026
7402141
Tests: Update the `core/content-query` tests for raw fields and statu…
jorgefilipecosta Oct 15, 2026
46f5910
Abilities API: Tidy the `core/content-query` description and empty ch…
jorgefilipecosta Oct 15, 2026
db32314
Tests: Trim the `core/content-query` tests.
jorgefilipecosta Oct 15, 2026
57b59c8
Abilities API: Reject an empty `status` filter in `core/content-query`.
jorgefilipecosta Oct 15, 2026
9aa12ff
Tests: Cover an empty `status` filter in `core/content-query`.
jorgefilipecosta Oct 15, 2026
90dbae1
Abilities API: Tidy the `core/content-query` field projection and err…
jorgefilipecosta Oct 15, 2026
ba24f7e
Abilities API: Document the `core/content-query` totals and page size.
jorgefilipecosta Oct 15, 2026
183b7bf
Abilities API: Name the field matching in `core/content-query`.
jorgefilipecosta Oct 15, 2026
b19a9df
Tests: Cover post types with their own capabilities in `core/content-…
jorgefilipecosta Oct 15, 2026
3bc9486
Abilities API: Restore the `core/content-query` post context after a …
jorgefilipecosta Oct 15, 2026
0670065
Tests: Cover a throwing `the_post` callback in `core/content-query`.
jorgefilipecosta Oct 15, 2026
0a95513
Abilities API: Accept a slug sent as a number in `core/content-query`.
jorgefilipecosta Oct 15, 2026
442c129
Tests: Cover a slug sent as a number in `core/content-query`.
jorgefilipecosta Oct 15, 2026
d5b3624
Abilities API: Drop `uniqueItems` from the `core/content-query` input…
jorgefilipecosta Oct 15, 2026
19043a5
Tests: Cover repeated list values in `core/content-query`.
jorgefilipecosta Oct 15, 2026
7540153
Abilities API: Restore `uniqueItems` in the `core/content-query` inpu…
jorgefilipecosta Oct 15, 2026
d26e2d3
Abilities API: Stop adding `id` to the `core/content-query` fields.
jorgefilipecosta Oct 15, 2026
809bb32
Tests: Remove repeated `core/content-query` ability tests.
jorgefilipecosta Oct 15, 2026
6c27ff0
Tests: Remove repeated `core/content-query` REST tests.
jorgefilipecosta Oct 15, 2026
c9296b7
Abilities API: Reset the `the_post` count after an early `core/conten…
jorgefilipecosta Oct 16, 2026
a807635
Tests: Cover running `core/content-query` before any global post.
jorgefilipecosta Oct 16, 2026
d333ae2
Abilities API: Document the `core/content-query` defaults and omitted…
jorgefilipecosta Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/wp-includes/abilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@

declare( strict_types = 1 );

require_once __DIR__ . '/abilities/class-wp-abilities-content.php';
require_once __DIR__ . '/abilities/class-wp-abilities-settings.php';
require_once __DIR__ . '/abilities/class-wp-abilities-users.php';

/**
* Registers the core ability categories.
*
* @since 6.9.0
* @since 7.2.0 Added the `uncategorized` category.
* @since 7.2.0 Added the `content` and `uncategorized` categories.
*/
function wp_register_core_ability_categories(): void {
wp_register_ability_category(
Expand All @@ -35,6 +36,14 @@ function wp_register_core_ability_categories(): void {
)
);

wp_register_ability_category(
'content',
array(
'label' => __( 'Content' ),
'description' => __( 'Abilities that retrieve or manage posts and other content.' ),
)
);

wp_register_ability_category(
'uncategorized',
array(
Expand All @@ -48,7 +57,7 @@ function wp_register_core_ability_categories(): void {
* Registers the default core abilities.
*
* @since 6.9.0
* @since 7.2.0 Added the `core/settings-get` and `core/users-query` abilities.
* @since 7.2.0 Added the `core/content-query`, `core/settings-get`, and `core/users-query` abilities.
*
* @global wpdb $wpdb WordPress database abstraction object.
*/
Expand Down Expand Up @@ -370,4 +379,7 @@ function wp_register_core_abilities(): void {

// Register the user abilities (currently the read-only `core/users-query`).
( new WP_Abilities_Users() )->register();

// Register the content abilities (currently the read-only `core/content-query`).
( new WP_Abilities_Content() )->register();
}
Loading
Loading