-
Notifications
You must be signed in to change notification settings - Fork 26
Comparing changes
Open a pull request
base repository: WordPress/abilities-api
base: v0.1.1
head repository: WordPress/abilities-api
compare: trunk
- 18 commits
- 57 files changed
- 26 contributors
Commits on Sep 9, 2025
-
Refactor the usage of
$properties
param to$args
to align with Wo……rdPress usage (#59) * dev: replace `WP_Ability::validate_properties()` with `::prepare_args()` * Rename properties to args in `WP_Ability` * Improve coding style according to conventions * Update since version * Fix coding style issue reported in WP core * Ensure there are no deprecation warning in PHP 8.3+ * Update version to account for the API changes applied --------- Co-authored-by: Dovid Levine <david@axepress.dev> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 118c476 - Browse repository at this point
Copy the full SHA 118c476View commit details
Commits on Sep 12, 2025
-
Add HEAD method support for performance optimization (#71)
* Add HEAD method support for performance optimization in REST API list controller * Address review feedback: include pagination links for HEAD requests and enhance test coverage * Fix HEAD test: remove incorrect assertion for self link in collection --------- Co-authored-by: Mohamed Khaled <mohamed.khaled@9hdigital.com> Unlinked contributors: mohamed.khaled@9hdigital.com. Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: Ref34t <mokhaled@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 2796a60 - Browse repository at this point
Copy the full SHA 2796a60View commit details -
Fix
$input
type hint inWP_Ability
(#61)* Fix `$input` type hint in `WP_Ability` * Update REST API usage for the input param to account for mixed type * Add unit tests covering input types * Make input optional on execute callback when no schema and input provided * Prefix data providers with `data_` to follow WP Core conventions * Extend testing code coverage * Add additional test for array input * Improve the tests * Update documentation to account for input type changes * Update includes/abilities-api/class-wp-ability.php Co-authored-by: Felix Arntz <flixos90@gmail.com> * Update includes/abilities-api/class-wp-ability.php Co-authored-by: Felix Arntz <flixos90@gmail.com> * Update includes/abilities-api/class-wp-ability.php Co-authored-by: Felix Arntz <flixos90@gmail.com> * Change input schema validation handling according to the feedback * Adjust tests to ensure that input schema is handled correctly * Define the explicit types for run args in REST API endpoint * Update includes/abilities-api/class-wp-ability.php Co-authored-by: Felix Arntz <flixos90@gmail.com> --------- Co-authored-by: Felix Arntz <flixos90@gmail.com> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: galatanovidiu <ovidiu-galatan@git.wordpress.org> Co-authored-by: felixarntz <flixos90@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 479dd5b - Browse repository at this point
Copy the full SHA 479dd5bView commit details
Commits on Sep 13, 2025
-
chore: update dev-deps to latest (#72)
Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 59d8ec6 - Browse repository at this point
Copy the full SHA 59d8ec6View commit details
Commits on Sep 18, 2025
-
fix: Use link_header() instead of add_link() to keep the responses as…
… a pure arrays (#81) Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 6143ba3 - Browse repository at this point
Copy the full SHA 6143ba3View commit details -
Co-authored-by: akkspros <passoniate@git.wordpress.org> Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 94d950a - Browse repository at this point
Copy the full SHA 94d950aView commit details
Commits on Sep 19, 2025
-
Docs: REST API Reference (#77)
* Docs: REST API Reference * Update docs/5.rest-api.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Improve the examples included in the document * Document user access requirements for REST API Added user access information for Abilities API. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for e48d165 - Browse repository at this point
Copy the full SHA e48d165View commit details -
Add execute actions to the ability object (#56)
* Add execute actions to the ability object * Update includes/abilities-api/class-wp-ability.php Co-authored-by: Dovid Levine <david@axepress.dev> * Add WordPress actions for ability execution hooks - Add before_execute_ability action that fires before ability execution - Add after_execute_ability action that fires after successful execution - Include comprehensive unit tests for both actions with edge cases - Add extensibility documentation with usage examples and best practices - Update README with new documentation link - Fix PHPDoc formatting for action parameters 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Improve code quality * Update README.md Co-authored-by: Dovid Levine <david@axepress.dev> * Address feedback from review --------- Co-authored-by: Dovid Levine <david@axepress.dev> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for c9abf12 - Browse repository at this point
Copy the full SHA c9abf12View commit details
Commits on Sep 23, 2025
-
Bump the PHPStan testing to PHP 8.4. (#82)
Co-authored-by: johnbillion <johnbillion@git.wordpress.org> Co-authored-by: JasonTheAdams <jason_the_adams@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 409a77e - Browse repository at this point
Copy the full SHA 409a77eView commit details -
feat!: make
permission_callback
arg required (#73)* feat!: make `permission_callback` arg required * Update tests/unit/abilities-api/wpAbilitiesRegistry.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * tests: add WP_Ability::prepare_properties to coverage * Update includes/abilities-api/class-wp-ability.php --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: felixarntz <flixos90@git.wordpress.org> Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 2f3cda7 - Browse repository at this point
Copy the full SHA 2f3cda7View commit details
Commits on Sep 26, 2025
-
Add client-side package for Abilities API (#60)
* WordPress Abilities API Client * Fix: minor formatting issues and test fix for pagination headers * fix: correct return type of wp_abilities_register_client_assets * fix: auto-init assets & use class pattern for registration * Normalize paths for asset loading * fix: package structure, pull in rules from gutenberg for eslint and tsconfig, and unify deps where possible * docs: Remove NPM package mention for now * refactor: Rename listAbilities to getAbilities & update reducer naming * fix: Update AbilityInput type to accept any JSON value * fix: correct package.json after rebase with trunk * fix: Use per_page=-1 instead of recursion in resolver * update: use addQueryArgs to build GET requests * fix: wrap strings with @wordpress/i18n * fix: phpstan issues in register_assets * fix: additional phpstan error * Add client-only ability registration (#69) * Client only abilities * fix: Add proper server ability validation in registerAbility * feat: Add ClientAbility and ServerAbility types for better type safety * refactor: Remove location field, use callback presence for execution type * feat: add permissionCallback on the client * update: check if ability is already registered in registerAbility * fix: wrap client errors in i18n * Add client library tests and code quality infrastructure (#70) * Add testing & linting infa * Remove uncessary combined checks * Add client tests * test: Use proper TypeScript types instead of 'as any' in tests * Fix typescript check for extra server check * test: update tests for client-only abilities API changes * chore: add build:client and dev:client scripts to root package.json * fix: formatting * fix: prettier issues * fix: apply Prettier formatting to README and validation.ts * deps: remove @types/wordpress__api-fetch since types are already shipped * fix: move validation to the store * fix: validate ability name uses same format as server * tests: clean up CI checks * deps: fix dev dependencies and remove extra package-lock.json * fix: rename main dev and build commands * fix: better match server validation rules for schema * Fix remaining validation issues Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org> --------- Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org> Co-authored-by: swissspidy <swissspidy@git.wordpress.org> * Do not translate thrown developer errors * use rimraf for cleaning files, move to root package.json * Use correct versions for CI * fix: move scripts to main package.json and prefer wp-scripts * Simplify client readme by linking to CONTRIBUTING.md for dev and testing commands * align tsconfig with gutenberg * fix wp-scripts build command * Build JS assets for the plugin zip * allow asset class prefix * Optimize npm dependencies * Fix Prettier config and format files accordingly * Use correct ajv-draft-04 import. Remove unusued jest libs * Only store valid ability keys in the store --------- Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org> Co-authored-by: swissspidy <swissspidy@git.wordpress.org> Co-authored-by: Grzegorz Ziolkowski <grzegorz@gziolo.pl> Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 4beab25 - Browse repository at this point
Copy the full SHA 4beab25View commit details
Commits on Sep 29, 2025
-
dev: add
register_ability_args
filter [Proposal] (#74)* dev: add `wp_ability_args` filter * Update docs/5.hooks.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * docs: fix `has_permissions` overload example * fix: rename/relocate filter and fix docs usage Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl> * docs: update remaining references * docs: merge hook docs * docs: code indentation * tests: add PHPUnit tests for `register_ability_args` * Update docs/6.hooks.md Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl> * tests: remove prior filters in _every_ setup/teardown --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 309f5a0 - Browse repository at this point
Copy the full SHA 309f5a0View commit details
Commits on Sep 30, 2025
-
docs: Fix the variable name (#92)
Typo in the variable name caused confusion in the documentation. Changed `$result` to `$site_info` for consistency with later usage (e.g., is_wp_error($site_info) and $site_info["'name'"]). Co-authored-by: mrabbani <mrabbani@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for a33e2be - Browse repository at this point
Copy the full SHA a33e2beView commit details -
Fix has_permission() return type inconsistency (Issue #67) (#76)
* Rename has_permission() to check_permission() with deprecation logic * Update tests to use check_permission() and add deprecation test * Fix remaining has_permission test usage that was causing CI failure * Remove specific deprecation test that was causing CI failures * Fix internal execute() method to use new check_permission() method * Add test coverage for deprecated has_permission method * Use WordPress test framework method for deprecated function coverage per maintainer feedback * Switch to @expectedDeprecated PHPDoc annotation for cleaner deprecation test --------- Co-authored-by: Mohamed Khaled <mohamed.khaled@9hdigital.com> Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl> Unlinked contributors: mohamed.khaled@9hdigital.com. Co-authored-by: Ref34t <mokhaled@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for cbe8a59 - Browse repository at this point
Copy the full SHA cbe8a59View commit details -
* Updated semantic headings for intro * Semantic headings for registering and using abilities
Configuration menu - View commit details
-
Copy full SHA for 8e0b08a - Browse repository at this point
Copy the full SHA 8e0b08aView commit details
Commits on Oct 1, 2025
-
Rename
check_permission()
tocheck_permissions()
onWP_Ability
(#……94) Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: justlevine <justlevine@git.wordpress.org> Co-authored-by: Ref34t <mokhaled@git.wordpress.org> Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 80f47ee - Browse repository at this point
Copy the full SHA 80f47eeView commit details
Commits on Oct 2, 2025
-
Fix backwards compatibility with WP_REST_Request API (#98)
Replace is_method() with get_method() for WordPress compatibility. The is_method() method does not exist on WP_REST_Request in earlier WordPress versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: budzanowski <budzanowski@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 41ec679 - Browse repository at this point
Copy the full SHA 41ec679View commit details -
Prepare the branch for
v0.2.0
release (#90)* Fix issues reported by PHPCS in WP core * Set the next release version in PHPDoc * Set the proper next version Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
Configuration menu - View commit details
-
Copy full SHA for 45cfa27 - 44E3 Browse repository at this point
Copy the full SHA 45cfa27View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.1.1...trunk