Ticket #12372: remove_archaic_reference_returns.12372.diff
| File remove_archaic_reference_returns.12372.diff, 2.0 KB (added by , 16 years ago) |
|---|
-
wp-includes/post.php
240 240 * @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N. 241 241 * @return array|bool False on failure and the type will be determined by $output parameter. 242 242 */ 243 function &get_children($args = '', $output = OBJECT) {243 function get_children($args = '', $output = OBJECT) { 244 244 $kids = array(); 245 245 if ( empty( $args ) ) { 246 246 if ( isset( $GLOBALS['post'] ) ) { … … 269 269 update_post_cache($children); 270 270 271 271 foreach ( $children as $key => $child ) 272 $kids[$child->ID] = &$children[$key];272 $kids[$child->ID] = $children[$key]; 273 273 274 274 if ( $output == OBJECT ) { 275 275 return $kids; -
wp-content/themes/twentyten/loop.php
30 30 <div class="entry-content"> 31 31 <div class="gallery-thumb"> 32 32 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php 33 $images = &get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );33 $images = get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) ); 34 34 $total_images = count($images); 35 35 $image = array_shift($images); 36 36 echo wp_get_attachment_image( $image->ID, 'thumbnail' ); … … 124 124 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 125 125 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 126 126 </div><!-- #nav-below --> 127 <?php } ?> 128 No newline at end of file 127 <?php } ?>