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-admin/nav-menus.php

    r33611 r33734  
    6868                $dbids_to_orders = array();
    6969                $orders_to_dbids = array();
    70                 foreach( (array) $ordered_menu_items as $ordered_menu_item_object ) {
     70                foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) {
    7171                    if ( isset( $ordered_menu_item_object->ID ) ) {
    7272                        if ( isset( $ordered_menu_item_object->menu_order ) ) {
     
    141141                $dbids_to_orders = array();
    142142                $orders_to_dbids = array();
    143                 foreach( (array) $ordered_menu_items as $ordered_menu_item_object ) {
     143                foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) {
    144144                    if ( isset( $ordered_menu_item_object->ID ) ) {
    145145                        if ( isset( $ordered_menu_item_object->menu_order ) ) {
     
    461461
    462462// Generate truncated menu names.
    463 foreach( (array) $nav_menus as $key => $_nav_menu ) {
     463foreach ( (array) $nav_menus as $key => $_nav_menu ) {
    464464    $nav_menus[$key]->truncated_name = wp_html_excerpt( $_nav_menu->name, 40, '…' );
    465465}
     
    589589    </h2>
    590590    <?php
    591     foreach( $messages as $message ) :
     591    foreach ( $messages as $message ) :
    592592        echo $message . "\n";
    593593    endforeach;
     
    669669                    <option value="0" selected="selected"><?php _e( '&mdash; Select &mdash;' ); ?></option>
    670670                <?php endif; ?>
    671                 <?php foreach( (array) $nav_menus as $_nav_menu ) : ?>
     671                <?php foreach ( (array) $nav_menus as $_nav_menu ) : ?>
    672672                    <option value="<?php echo esc_attr( $_nav_menu->term_id ); ?>" <?php selected( $_nav_menu->term_id, $nav_menu_selected_id ); ?>>
    673673                        <?php
Note: See TracChangeset for help on using the changeset viewer.