Opened 11 years ago
Closed 11 years ago
#34386 closed defect (bug) (invalid)
Get_post_types double calls....
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
get_post_types() has argument _builtin, not correctly implemented...
when i created custom QUERY, I have to call that function twice:
$args['post_type'] = array_merge(get_post_types(array('_builtin'=>true)),get_post_types(array('_builtin'=>false)));
so, its good, if there was a value of '_builtin'=>"ALL" , so it gets both of them, not only TRUE or FALSE ones...
It will save DATABASE calls!!
Change History (2)
Note: See
TracTickets for help on using
tickets.
get_post_types()(without a parameter) should return all post types, regardless of the_builtinvalue.It also does not perform any database calls, since post types are registered at runtime.