WordPress.org

Make WordPress Core

Changeset 7894


Ignore:
Timestamp:
05/05/08 16:03:27 (7 years ago)
Author:
ryan
Message:

Use array calling style. Props DD32. see #6647

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r7888 r7894  
    587587            $attachments = array($post->ID => $post); 
    588588        else 
    589             $attachments = get_children("post_parent=$post_id&post_type=attachment&orderby=menu_order ASC, ID&order=DESC"); 
     589            $attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') ); 
    590590    } else { 
    591591        if ( is_array($GLOBALS['wp_the_query']->posts) ) 
  • trunk/wp-includes/post.php

    r7892 r7894  
    7171    if ( empty( $args ) ) { 
    7272        if ( isset( $GLOBALS['post'] ) ) { 
    73             $args = 'post_parent=' . (int) $GLOBALS['post']->post_parent; 
     73            $args = array('post_parent' => (int) $GLOBALS['post']->post_parent ); 
    7474        } else { 
    7575            return false; 
    7676        } 
    7777    } elseif ( is_object( $args ) ) { 
    78         $args = 'post_parent=' . (int) $args->post_parent; 
     78        $args = array('post_parent' => (int) $args->post_parent ); 
    7979    } elseif ( is_numeric( $args ) ) { 
    80         $args = 'post_parent=' . (int) $args; 
     80        $args = array('post_parent' => (int) $args); 
    8181    } 
    8282 
Note: See TracChangeset for help on using the changeset viewer.