Remove archaic reference return in get_children(). Props filosofo. Fixes #12372
git-svn-id: https://develop.svn.wordpress.org/trunk@16667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1a294648a8
commit
c6d9ed1f35
|
@ -266,7 +266,7 @@ function _wp_relative_upload_path( $path ) {
|
||||||
* @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N.
|
* @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N.
|
||||||
* @return array|bool False on failure and the type will be determined by $output parameter.
|
* @return array|bool False on failure and the type will be determined by $output parameter.
|
||||||
*/
|
*/
|
||||||
function &get_children($args = '', $output = OBJECT) {
|
function get_children($args = '', $output = OBJECT) {
|
||||||
$kids = array();
|
$kids = array();
|
||||||
if ( empty( $args ) ) {
|
if ( empty( $args ) ) {
|
||||||
if ( isset( $GLOBALS['post'] ) ) {
|
if ( isset( $GLOBALS['post'] ) ) {
|
||||||
|
@ -295,7 +295,7 @@ function &get_children($args = '', $output = OBJECT) {
|
||||||
update_post_cache($children);
|
update_post_cache($children);
|
||||||
|
|
||||||
foreach ( $children as $key => $child )
|
foreach ( $children as $key => $child )
|
||||||
$kids[$child->ID] =& $children[$key];
|
$kids[$child->ID] = $children[$key];
|
||||||
|
|
||||||
if ( $output == OBJECT ) {
|
if ( $output == OBJECT ) {
|
||||||
return $kids;
|
return $kids;
|
||||||
|
|
Loading…
Reference in New Issue