[wp-trac] [WordPress Trac] #33519: Additional choices for 'fields' parameter
WordPress Trac
noreply at wordpress.org
Sun Aug 23 15:05:00 UTC 2015
#33519: Additional choices for 'fields' parameter
-------------------------+-----------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
When using the 'fields' argument in the `get_terms()` function, there are
several useful options that can be specified to get the exact return
values needed (in addition to complete term objects it is possible to get
`ids`, `id=>parent`, `names`, `count`, `id=>name` and `id=>slug`).
A similar functionality exists for post queries (like in `get_posts()`),
however it doesn't provide the same value like its term-related equivalent
(since in addition to complete post objects, it is only possible to
request `ids` or `id=>parent`). The most important thing I am missing is
something like `id=>title`, which would be especially useful for custom
dropdowns or listings, but there might be other options that could be
supported as well.
I will gladly write a patch for this issue after I have received some
feedback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33519>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list