#51720 closed defect (bug) (fixed)
Make wp_array_get internal for now. Add tests to _wp_array_get;
Reported by: | jorgefilipecosta | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | General | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description (last modified by )
According to feedback received at #51461. This ticket contains a patch to make wp_array_get internal.
After more core code uses it we can decide if the function is valuable and something we want to expose or not.
This Patch also adds test cases and does some enhancements to the function wp_array_get to make it more similar to lodash namely the default value and the way null is handled.
Change History (15)
This ticket was mentioned in PR #692 on WordPress/wordpress-develop by jorgefilipecosta.
4 years ago
#1
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#4
@
4 years ago
@jorgefilipecosta Can you point us to the upstream tests for this function please? It would be worth bringing them into core regardless of whether it's a private function or not.
#5
@
4 years ago
- Description modified (diff)
- Summary changed from Make wp_array_get internal for now to Make wp_array_get internal for now. Add tests to _wp_array_get;
#6
@
4 years ago
Hi @johnbillion we did not have tests for this function. I added tests to this Patch/PR.
According to feedback received in ticket 51461. This PR contains makes wp_array_get internal.
After more core code uses it we can decide if the function is valuable and something we want to expose or not.
Trac ticket: core.trac.wordpress.org/ticket/51720