From a3bc5f60da78449367fb0e51ff88cd2404c19a5f Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 5 May 2008 16:03:27 +0000 Subject: [PATCH] Use array calling style. Props DD32. see #6647 git-svn-id: http://svn.automattic.com/wordpress/trunk@7894 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 2 +- wp-includes/post.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 80c3bd24b7..2b4fa70275 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -586,7 +586,7 @@ function get_media_items( $post_id, $errors ) { if ( $post && $post->post_type == 'attachment' ) $attachments = array($post->ID => $post); else - $attachments = get_children("post_parent=$post_id&post_type=attachment&orderby=menu_order ASC, ID&order=DESC"); + $attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') ); } else { if ( is_array($GLOBALS['wp_the_query']->posts) ) foreach ( $GLOBALS['wp_the_query']->posts as $attachment ) diff --git a/wp-includes/post.php b/wp-includes/post.php index 63c9ff48a5..97e9c07803 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -70,14 +70,14 @@ function update_attached_file( $attachment_id, $file ) { function &get_children($args = '', $output = OBJECT) { if ( empty( $args ) ) { if ( isset( $GLOBALS['post'] ) ) { - $args = 'post_parent=' . (int) $GLOBALS['post']->post_parent; + $args = array('post_parent' => (int) $GLOBALS['post']->post_parent ); } else { return false; } } elseif ( is_object( $args ) ) { - $args = 'post_parent=' . (int) $args->post_parent; + $args = array('post_parent' => (int) $args->post_parent ); } elseif ( is_numeric( $args ) ) { - $args = 'post_parent=' . (int) $args; + $args = array('post_parent' => (int) $args); } $defaults = array(