Skip to content

Commit c2e2e22

Browse files
Add: WordPress Core Post Management Abilities
1 parent d96ff0b commit c2e2e22

2 files changed

Lines changed: 1386 additions & 0 deletions

File tree

src/wp-includes/abilities.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
declare( strict_types = 1 );
1111

12+
require_once __DIR__ . '/abilities/class-wp-posts-abilities.php';
13+
1214
/**
1315
* Registers the core ability categories.
1416
*
@@ -32,6 +34,14 @@ function wp_register_core_ability_categories(): void {
3234
'description' => __( 'Abilities that retrieve or modify user information and settings.' ),
3335
)
3436
);
37+
38+
wp_register_ability_category(
39+
'post',
40+
array(
41+
'label' => __( 'Post' ),
42+
'description' => __( 'Abilities related to the creation and management of posts of all types.' ),
43+
)
44+
);
3545
}
3646

3747
/**
@@ -259,4 +269,6 @@ function wp_register_core_abilities(): void {
259269
),
260270
)
261271
);
272+
273+
WP_Posts_Abilities::register();
262274
}

0 commit comments

Comments
 (0)