Make WordPress Core

Changeset 14122


Ignore:
Timestamp:
04/17/2010 10:30:46 AM (16 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r14117 r14122  
    120120        register_post_status( 'inherit', array( 'label' => _x('Inherit', 'post'),
    121121                                                                                        'internal' => true,
     122                                                                                        'exclude_from_search' => false,
    122123                                                                                        '_builtin' => true, /* internal use only. */
    123124                                                                                        'label_count' => _n_noop('Inherit <span class="count">(%s)</span>', 'Inherit <span class="count">(%s)</span>')
     
    10081009                $r['cat'] = $r['category'];
    10091010        if ( ! empty($r['include']) ) {
    1010                 $incposts = preg_split('/[\s,]+/',$r['include']);
     1011                $incposts = preg_split('/[\s,]+/', $r['include']);
    10111012                $r['posts_per_page'] = count($incposts);  // only the number of posts included
    10121013                $r['post__in'] = $incposts;
Note: See TracChangeset for help on using the changeset viewer.