From 93a08d4d6f29fd0873ccca141bf2d3693e21d63d Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 27 Jun 2010 04:21:33 +0000 Subject: [PATCH] Increment first, to avoid ++ later on when it conflicts with [25]. git-svn-id: http://svn.automattic.com/wordpress/trunk@15338 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 7d447c63e1..2175f4a369 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -123,7 +123,7 @@ $_wp_last_object_menu = 25; // The index of the last top-level menu in the objec foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false) ) as $ptype ) { $ptype_obj = get_post_type_object( $ptype ); - $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : $_wp_last_object_menu++; // If we're to use $_wp_last_object_menu, increment it first. + $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first. $ptype_for_id = sanitize_html_class( $ptype ); if ( is_string( $ptype_obj->menu_icon ) ) { $menu_icon = esc_url( $ptype_obj->menu_icon );