Changeset 30982 for trunk/src/wp-includes/post.php
- Timestamp:
- 12/20/2014 10:46:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r30735 r30982 353 353 return $kids; 354 354 } elseif ( $output == ARRAY_A ) { 355 foreach ( (array) $kids as $kid ) 355 $weeuns = array(); 356 foreach ( (array) $kids as $kid ) { 356 357 $weeuns[$kid->ID] = get_object_vars($kids[$kid->ID]); 358 } 357 359 return $weeuns; 358 360 } elseif ( $output == ARRAY_N ) { 359 foreach ( (array) $kids as $kid ) 361 $babes = array(); 362 foreach ( (array) $kids as $kid ) { 360 363 $babes[$kid->ID] = array_values(get_object_vars($kids[$kid->ID])); 364 } 361 365 return $babes; 362 366 } else { … … 1682 1686 $object->labels['all_items'] = $object->labels['menu_name']; 1683 1687 1684 foreach ( $nohier_vs_hier_defaults as $key => $value ) 1685 $defaults[$key] = $object->hierarchical ? $value[1] : $value[0]; 1686 1688 $defaults = array(); 1689 foreach ( $nohier_vs_hier_defaults as $key => $value ) { 1690 $defaults[$key] = $object->hierarchical ? $value[1] : $value[0]; 1691 } 1687 1692 $labels = array_merge( $defaults, $object->labels ); 1688 1693 return (object)$labels; … … 2511 2516 if ( is_string($post_mime_types) ) 2512 2517 $post_mime_types = array_map('trim', explode(',', $post_mime_types)); 2518 2519 $wheres = array(); 2520 2513 2521 foreach ( (array) $post_mime_types as $mime_type ) { 2514 2522 $mime_type = preg_replace('/\s/', '', $mime_type); … … 5141 5149 } 5142 5150 5151 $types = array(); 5143 5152 // Icon basename - extension = MIME wildcard. 5144 5153 foreach ( $icon_files as $file => $uri ) … … 5514 5523 $ptypes = $post_type; 5515 5524 } elseif ( 'any' == $post_type ) { 5525 $ptypes = array(); 5516 5526 // Just use the post_types in the supplied posts. 5517 foreach ( $posts as $post ) 5527 foreach ( $posts as $post ) { 5518 5528 $ptypes[] = $post->post_type; 5529 } 5519 5530 $ptypes = array_unique($ptypes); 5520 5531 } else {
Note: See TracChangeset
for help on using the changeset viewer.