From eb74c91d9fc527ea23e7bcb87a7d5be450bd1fbb Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 17 Apr 2010 10:30:46 +0000 Subject: [PATCH] Do not exclude inherit post_status from query results, Fixes Attachment listing in Gallery tab as well as displaying galleries on the front end (get_children() & friends). See #13031 git-svn-id: http://svn.automattic.com/wordpress/trunk@14122 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index d0ec83810b..f5951e0107 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -119,6 +119,7 @@ function create_initial_post_types() { register_post_status( 'inherit', array( 'label' => _x('Inherit', 'post'), 'internal' => true, + 'exclude_from_search' => false, '_builtin' => true, /* internal use only. */ 'label_count' => _n_noop('Inherit (%s)', 'Inherit (%s)') ) ); @@ -1007,7 +1008,7 @@ function get_posts($args = null) { if ( ! empty($r['category']) ) $r['cat'] = $r['category']; if ( ! empty($r['include']) ) { - $incposts = preg_split('/[\s,]+/',$r['include']); + $incposts = preg_split('/[\s,]+/', $r['include']); $r['posts_per_page'] = count($incposts); // only the number of posts included $r['post__in'] = $incposts; } elseif ( ! empty($r['exclude']) )