Make WordPress Core


Ignore:
Timestamp:
09/02/2015 06:47:51 PM (10 years ago)
Author:
wonderboymusic
Message:

After [33723], ensure that $i is properly set before looping.

See #16865.

File:
1 edited

Legend:

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

    r33723 r33867  
    5151    /* translators: add new file */
    5252    $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
     53    $i = 15;
    5354    foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
    5455        if ( ! $tax->show_ui || ! $tax->show_in_menu )
     
    5758        $submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&post_type=attachment' );
    5859    }
    59     unset($tax);
     60    unset( $tax, $i );
    6061
    6162$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
Note: See TracChangeset for help on using the changeset viewer.