WordPress.org

Make WordPress Core

Ticket #12372: remove_archaic_reference_returns.12372.diff

File remove_archaic_reference_returns.12372.diff, 2.0 KB (added by filosofo, 4 years ago)
  • wp-includes/post.php

     
    240240 * @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N. 
    241241 * @return array|bool False on failure and the type will be determined by $output parameter. 
    242242 */ 
    243 function &get_children($args = '', $output = OBJECT) { 
     243function get_children($args = '', $output = OBJECT) { 
    244244        $kids = array(); 
    245245        if ( empty( $args ) ) { 
    246246                if ( isset( $GLOBALS['post'] ) ) { 
     
    269269        update_post_cache($children); 
    270270 
    271271        foreach ( $children as $key => $child ) 
    272                 $kids[$child->ID] =& $children[$key]; 
     272                $kids[$child->ID] = $children[$key]; 
    273273 
    274274        if ( $output == OBJECT ) { 
    275275                return $kids; 
  • wp-content/themes/twentyten/loop.php

     
    3030                <div class="entry-content"> 
    3131                        <div class="gallery-thumb"> 
    3232                                <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) ); 
    3434                                $total_images = count($images); 
    3535                                $image = array_shift($images); 
    3636                                echo wp_get_attachment_image( $image->ID, 'thumbnail' ); 
     
    124124                                        <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' )); ?></div> 
    125125                                        <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )); ?></div> 
    126126                                </div><!-- #nav-below --> 
    127 <?php } ?> 
    128  No newline at end of file 
     127<?php } ?>