[wp-trac] [WordPress Trac] #24811: get_post_type returns attachment as a searchable post type
WordPress Trac
noreply at wordpress.org
Sun Jul 21 19:27:20 UTC 2013
#24811: get_post_type returns attachment as a searchable post type
---------------------------+-----------------------------
Reporter: unknowndomain | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: 3.5.2
Severity: normal | Keywords:
---------------------------+-----------------------------
I don't think `get_post_type()` should return the `attachment` post type
as a searchable post type, because it doesn't show up in the search
results.
In other words, this code snippet returns `post` and `attachment` and I
think this is wrong...
{{{
$post_types = get_post_types( array(
'public' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'show_ui' => true,
'hierarchical' => false
) );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24811>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list