Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Add code quality improvements to code comments - #47

Merged
gziolo merged 1 commit into
trunkfrom
fix/improve-code-quality
Aug 27, 2025
Merged

Add code quality improvements to code comments#47
gziolo merged 1 commit into
trunkfrom
fix/improve-code-quality

Conversation

@gziolo

@gziolo gziolo commented Aug 27, 2025

Copy link
Copy Markdown
Member

Code quality improvements extracted from #37.

CI checks should pass here.

CI checks should pass also for the code tested agains WordPress core in WordPress/wordpress-develop#9410.

@gziolo gziolo self-assigned this Aug 27, 2025
@gziolo gziolo added the Good First Review Optional review only label label Aug 27, 2025
@gziolo gziolo changed the title Propose filters to use with the registered ability Aug 27, 2025
@gziolo
gziolo force-pushed the fix/improve-code-quality branch from 38686eb to 8e8999a Compare August 27, 2025 16:03
Comment thread includes/abilities-api/class-wp-ability.php

@justlevine justlevine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

(To accommodate the dual falsy false|WP_Error return values, we're gonna want to make sure that usage and docs use if ( true === $ability->has_permissions() ) and not e.g. the shorthand if ( $ability->has_permissions() ) which will also return true for a WP_Error.)

@gziolo
gziolo merged commit 3ad7a38 into trunk Aug 27, 2025
15 checks passed
@gziolo
gziolo deleted the fix/improve-code-quality branch August 27, 2025 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Good First Review Optional review only label

2 participants