WordPress.org

Make WordPress Core

Changeset 16819


Ignore:
Timestamp:
12/08/10 21:17:01 (3 years ago)
Author:
markjaquith
Message:

Use is_page_type_hierarchical(). props nacin. see #15140

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r16818 r16819  
    40264026 
    40274027    // we're only concerned with published, non-hierarchical objects 
    4028     $ptype_obj = get_post_type_object( $post->post_type ); 
    4029     if ( $post->post_status != 'publish' || !$ptype_obj || $ptype_obj->hierarchical ) 
     4028    if ( $post->post_status != 'publish' || is_post_type_hierarchical( $post->post_type ) ) 
    40304029        return; 
    40314030 
  • trunk/wp-includes/query.php

    r16818 r16819  
    32333233 
    32343234        // Do not attempt redirect for hierarchical post types 
    3235         $ptype_obj = get_post_type_object( $post_type ); 
    3236         if ( !$ptype_obj || $ptype_obj->hierarchical ) 
     3235        if ( is_post_type_hierarchical( $post_type ) ) 
    32373236            return; 
    32383237 
Note: See TracChangeset for help on using the changeset viewer.