Make WordPress Core


Ignore:
Timestamp:
08/25/2015 08:27:56 PM (9 years ago)
Author:
wonderboymusic
Message:

foreach is a statement, not a function.

See #33491.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r33611 r33734  
    645645        usort($items, '_sort_nav_menu_items');
    646646        $i = 1;
    647         foreach( $items as $k => $item ) {
     647        foreach ( $items as $k => $item ) {
    648648            $items[$k]->{$args['output_key']} = $i++;
    649649        }
     
    849849        )
    850850    );
    851     foreach( (array) $menu_items as $menu_item ) {
     851    foreach ( (array) $menu_items as $menu_item ) {
    852852        if ( isset( $menu_item->ID ) && is_nav_menu_item( $menu_item->ID ) ) {
    853853            $menu_item_type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
     
    884884    $menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'post_type' );
    885885
    886     foreach( (array) $menu_item_ids as $menu_item_id ) {
     886    foreach ( (array) $menu_item_ids as $menu_item_id ) {
    887887        wp_delete_post( $menu_item_id, true );
    888888    }
     
    903903    $menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'taxonomy', $taxonomy );
    904904
    905     foreach( (array) $menu_item_ids as $menu_item_id ) {
     905    foreach ( (array) $menu_item_ids as $menu_item_id ) {
    906906        wp_delete_post( $menu_item_id, true );
    907907    }
Note: See TracChangeset for help on using the changeset viewer.