Releases: WordPress/abilities-api
Releases · WordPress/abilities-api
v0.4.0
This release syncs all the changes that are going to be included in the WordPress 6.9 release.
What's Changed
- Add initial core abilities for WordPress 6.9 by @Jameswlepage in #108
- Docs preparations for WP 6.9 by @jonathanbossenger in #117
- Clean up doc numbering by @jonathanbossenger in #125
- Sync changes from WordPress core after 6.9 beta 1 by @gziolo in #126
- Update: Simplify core abilities registration in preparation for core patch. by @jorgefilipecosta in #128
- Doc updates from WP 6.9 beta 1 by @jonathanbossenger in #131
Breaking Changes
- All WP hooks got prefixed with
wp_.wp_abilities_api_categories_initwp_abilities_api_initwp_before_execute_abilitywp_after_execute_abilitywp_register_ability_category_argswp_register_ability_args
- Ability categories and abilities can only be registered after the
initaction has fired. check_permissions()on theWP_Abilityclass no longer validates the input. There is now a new public methodvalidate_input()that has to be called explicitly.- REST API endpoints have a new URL structure with
wp-abilities/v1namespace, example:https://example.com/wp-json/wp-abilities/v1/categories
New Contributors
- @Jameswlepage made their first contribution in #108
- @jorgefilipecosta made their first contribution in #128
Full Changelog: v0.3.0...v0.4.0
v0.3.0
What's Changed
- Proposal: Add ability anotations by @gziolo in #99
- Add new
show_in_restarg to control REST API exposure by @gziolo in #103 - Move
show_in_restto meta in the registration process by @gziolo in #107 - Move new
annotationsproperty undermetaand update docs by @gziolo in #104 - Introduce
invoke_callbackhelper method inWP_Abilityclass by @gziolo in #88 - Feature: add categories system by @galatanovidiu in #102
- Create reference docs for client-side API by @jonathanbossenger in #87
- Add category support to client package by @emdashcodes in #114
- Update version to 0.3.0 in preparation to Composer package release by @gziolo in #116
- Update README.md by @karmatosed in #118
- Add category listing endpoints for the REST API by @emdashcodes in #120
- Add category listing and validation to client package by @emdashcodes in #121
Breaking Changes
- It's now mandatory to provide a registered category with
wp_register_ability_category()when registering an ability withwp_register_ability(). - It's also mandatory to provide a category name when registering the ability on the client with
wp.abilities.registerAbility. - By default, all abilities are no longer exposed through the REST API. To opt into the old behavior, provide
metacontaining[ 'show_in_rest' => true ]. - Meta annotations were introduced to control which HTTP method,
GETvsPOST, is used to execute an ability through the REST API. In particular, if you want to useGET, then make sure to include inmetathe following override[ 'annotations' => [ 'readonly' => true ] ].
New Contributors
- @galatanovidiu made their first contribution in #102
- @karmatosed made their first contribution in #118
Full Changelog: v0.2.0...v0.3.0-rc.2
v0.2.0
What's Changed
- Refactor the usage of
$propertiesparam to$argsto align with WordPress usage by @gziolo in #59 - Add HEAD method support for performance optimization by @Ref34t in #71
- Fix
$inputtype hint inWP_Abilityby @gziolo in #61 - chore: update dev-deps to latest by @justlevine in #72
- fix: use link_header instead of add_link for pagination responses by @emdashcodes in #81
- Update CONTRIBUTING.md by @akkspros in #80
- Docs: REST API Reference by @gziolo in #77
- Add execute actions to the ability object by @gziolo in #56
- dev: Bump the PHPStan testing to PHP 8.4 by @johnbillion in #82
- feat!: make
permission_callbackarg required by @justlevine in #73 - Add client-side package for Abilities API by @emdashcodes in #60
- dev: add
register_ability_argsfilter [Proposal] by @justlevine in #74 - docs: Fix the variable name by @mrabbani in #92
- Fix has_permission() return type inconsistency (Issue #67) by @Ref34t in #76
- Docs/semantic headings by @jonathanbossenger in #96
- Rename
check_permission()tocheck_permissions()onWP_Abilityby @gziolo in #94 - Fix backwards compatibility with WP_REST_Request API by @budzanowski in #98
- Prepare the branch for
v0.2.0release by @gziolo in #90 - Include JS build files in the Composer package in v0.2.0 release by @gziolo in #100
Braking changes
They are primarily included in the WP_Ability object:
permission_callbackis now mandatory when registering an ability withwp_register_ability.has_permissionwas deprecated in favor ofcheck_permissions.executeandcheck_permissions(previouslyhas_permission) methods no longer accept onlyarrays. It's now possible to provide any input type, and it defaults tonull.- When no input schema is provided, then
permission_callbackandexecute_callbackget executed with no arguments. - Some other protected methods, like
validate_inputanddo_execute, also have different method signatures because of the input parameter changes.
New Contributors
- @Ref34t made their first contribution in #71
- @akkspros made their first contribution in #80
- @johnbillion made their first contribution in #82
- @mrabbani made their first contribution in #92
Full Changelog: v0.1.1...v0.2.0-rc
v0.1.1
What's Changed
- Documentation: Include specific nvm version needed by @rollybueno in #33
- Updated Inline Documentation Order by @shail-mehta in #49
- Introduce Props Bot workflow by @desrosj in #50
- Updated Inline Documentation Order by @sandipr942 in #57
- dev!: handle property registration inside WP_Ability by @justlevine in #54
- Fix REST API initialization for composer package usage by @budzanowski in #55
New Contributors
- @rollybueno made their first contribution in #33
- @shail-mehta made their first contribution in #49
- @desrosj made their first contribution in #50
- @sandipr942 made their first contribution in #57
- @budzanowski made their first contribution in #55
Full Changelog: v0.1.0...v0.1.1
Initial release
What's Included
- Implement server-side registry for Abilities API by @gziolo in #3
- chore: scaffold plugin entrypoint and tooling by @justlevine in #4
- Add REST API controllers for Abilities API by @emdashcodes in #6
- chore: php remediations by @justlevine in #11
- Adjust directory structure to align with WP core by @gziolo in #12
- ci: fix lint trigger on test GH workflow by @justlevine in #17
- tools(phpcs): remove conflicting TypeHint rules from PHPCS ruleset. by @justlevine in #15
- chore: align reqs with WP6.9 merge target by @justlevine in #18
- dev: use
$request->get_params()in REST controllers by @justlevine in #22 - Chore: Fix coding standard issues reported on wordpress-develop by @gziolo in #25
- ci: fixes and cleanup by @justlevine in #26
- code quality: add PHPStan array shape for ability
$propertiesby @justlevine in #20 - dev: use
WP_Abilities_Registry::$instanceinstead of adding a newglobalby @justlevine in #19 - dev!: return
WP_ErrorfromWP_Abilitymethods by @justlevine in #23 - Adding initial developer documentation by @jonathanbossenger in #10
- Update readme with links to documenation by @jonathanbossenger in #27
- Add LICENSE.md file by @gziolo in #29
- ci: build zip file for GitHub release by @justlevine in #24
- Refactor error handling in REST API run controller by @gziolo in #31
- Chore: Run
lint:php:fixon test files by @gziolo in #36 - Remove
ignoreErrorsfrom PHPStan by @gziolo in #40 - Update an example in Introduction & Overview document by @jonathanbossenger in #43
- dev!: require
string $namefor registration by @justlevine in #21 - Update 3.registering-abilities.md by @mujuonly in #46
- Add code quality improvements to code comments by @gziolo in #47
- Chore: Configure the composer package for publishing by @gziolo in #35
- docs: add installation steps for release by @justlevine in #48
New Contributors
- @gziolo made their first contribution in #3
- @justlevine made their first contribution in #4
- @emdashcodes made their first contribution in #6
- @jonathanbossenger made their first contribution in #10
- @mujuonly made their first contribution in #46
Full Changelog: https://github.com/WordPress/abilities-api/commits/v0.1.0