Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions includes/abilities-api/class-wp-ability-category.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/**
* Abilities API
*
* Defines WP_Ability_Category class.
* Defines the WP_Ability_Category class for organizing and categorizing
* related abilities within the Abilities API.
*
* @package WordPress
* @subpackage Abilities API
Expand Down Expand Up @@ -186,7 +187,7 @@ public function get_description(): string {
*
* @since 6.9.0
*
* @return array<string,mixed> The metadata for the ability category.
* @return array<string, mixed> The metadata for the ability category.
*/
public function get_meta(): array {
return $this->meta;
Expand Down
1 change: 1 addition & 0 deletions includes/rest-api/class-wp-rest-abilities-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class WP_REST_Abilities_Init {
*
* @param WP_REST_Server|null $rest_server Optional. The REST server to register routes with. Default null, which
* will use the main REST server instance.
* @return void
*/
public static function register_routes( $rest_server = null ): void {
if ( ! $rest_server instanceof WP_REST_Server ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class WP_REST_Abilities_V1_Categories_Controller extends WP_REST_Controller {
* @since 6.9.0
*
* @see register_rest_route()
* @return void
*/
public function register_routes(): void {
register_rest_route(
Expand Down Expand Up @@ -161,7 +162,7 @@ public function get_item( $request ) {
* @since 6.9.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool True if the request has read access.
* @return bool True if the request has read access, false otherwise.
*/
public function get_items_permissions_check( $request ) {
return current_user_can( 'read' );
Expand All @@ -173,7 +174,7 @@ public function get_items_permissions_check( $request ) {
* @since 6.9.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool True if the request has read access.
* @return bool True if the request has read access, false otherwise.
*/
public function get_item_permissions_check( $request ) {
return current_user_can( 'read' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class WP_REST_Abilities_V1_List_Controller extends WP_REST_Controller {
* @since 6.9.0
*
* @see register_rest_route()
* @return void
*/
public function register_routes(): void {
register_rest_route(
Expand Down Expand Up @@ -176,7 +177,7 @@ public function get_item( $request ) {
* @since 6.9.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool True if the request has read access.
* @return bool True if the request has read access, false otherwise.
*/
public function get_items_permissions_check( $request ) {
return current_user_can( 'read' );
Expand All @@ -188,7 +189,7 @@ public function get_items_permissions_check( $request ) {
* @since 6.9.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool True if the request has read access.
* @return bool True if the request has read access, false otherwise.
*/
public function get_item_permissions_check( $request ) {
return current_user_can( 'read' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class WP_REST_Abilities_V1_Run_Controller extends WP_REST_Controller {
* @since 6.9.0
*
* @see register_rest_route()
* @return void
*/
public function register_routes(): void {
register_rest_route(
Expand Down Expand Up @@ -188,7 +189,7 @@ public function check_ability_permissions( $request ) {
* @since 6.9.0
*
* @param WP_REST_Request $request The request object.
* @return mixed|null The input parameters.
* @return mixed|null The input parameters, or null if not provided.
*/
private function get_input_from_request( $request ) {
if ( in_array( $request->get_method(), array( 'GET', 'DELETE' ), true ) ) {
Expand Down