Make WordPress Core

Changeset 6397


Ignore:
Timestamp:
12/17/2007 06:21:43 AM (17 years ago)
Author:
ryan
Message:

Accept array of pages for is_page(). Props azaozz. fixes #5430

File:
1 edited

Legend:

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

    r6380 r6397  
    153153    $page_obj = $wp_query->get_queried_object();
    154154
    155     if ( $page == $page_obj->ID )
    156         return true;
    157     elseif ( $page == $page_obj->post_title )
    158         return true;
    159     else if ( $page == $page_obj->post_name )
     155    $page = (array) $page;
     156   
     157    if ( in_array( $page_obj->ID, $page ) )
     158        return true;
     159    elseif ( in_array( $page_obj->post_title, $page ) )
     160        return true;
     161    else if ( in_array( $page_obj->post_name, $page ) )
    160162        return true;
    161163
Note: See TracChangeset for help on using the changeset viewer.