Opened 9 years ago
Closed 9 years ago
#41055 closed enhancement (fixed)
WP-API JS Client: Improve support for meta
| Reported by: | adamsilverstein | Owned by: | adamsilverstein |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | General | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: | javascript, rest-api |
Description
The wp.api JavaScript client support for meta needs some attention:
- Meta helper isn't available for comments, terms and users
- Meta pieces haven't been updated for the new-style meta model
The getMeta helper should work correctly for all object types that support meta. We should also consider adding a matching setMeta helper.
Attachments (4)
Change History (12)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
9 years ago
#4
@
9 years ago
- Keywords has-unit-tests commit added; needs-unit-tests removed
In 41055.2.diff:
REST API JS Client - improve support for meta.
- Add
getMeta,getMetas,setMeta,setMetashelpers for models that contain meta. - Add tests for new helpers.
- Include meta data in fixture generation and fixture file driving tests.
This ticket was mentioned in Slack in #core-restapi by adamsilverstein. View the logs.
9 years ago
#6
@
9 years ago
In 41055.4.diff:
- Add tests: test meta support for
Posts,Comments,TagsandUsers. - Add meta for these types to
test_build_wp_api_client_fixtures - Update generated fixture data.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
9 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 41055.diff :
Improve support for and detection of meta.
wp.api.models.Post,User,Commentand other models supporting meta now include helpers forgetMeta()andsetMeta().Some unit tests verifying at a minimum that the helpers are attached would be helpful.