Support » Plugin: CMS-Like Admin Menu » [Plugin: cms-like-admin-menu ] Broken: URLs are wrong, icons are missing

  • Helen Hou-Sandi


    WordPress Dev

    This plugin is broken as of WP 3.0 due to a few changed admin URLs.

    • Pages URL is now edit.php?post_type=page
    • New page URL is now post-new.php?post_type=page
    • Post categories URL is now edit-tags.php?taxonomy=category

    Also, post tags appears twice in the menu and shows above categories, which is not the case in the default menu. Commenting the foreach loop out fixed the problem.

    Finally, the menu icons are missing due to a missing CSS class. menu-item-page or menu-item-post should come after menu-top.

    Editing all of the above fixed it!

Viewing 1 replies (of 1 total)
  • Thank you for the post, it doesn’t look like this plugin is getting updated anytime soon though. Quick correction, the missing Classes are actually menu-icon-page & menu-icon-post

    Here is the full source of the updated plugin if anyone is unsure of how to edit:

    	Plugin Name: CMS-like Admin Menu (3.0 Compatible)
    	Plugin URI:
    	Version: 2.2
    	Description: Makes the WordPress Admin menu focused for a more CMS-like usage.
    	Author: Keith Solomon
    	Author URI:
    	Copyright (c) 2009 Keith Solomon (
    	CMS-like Admin Menu is released under the GNU General Public License (GPL)
     * Changes the positions of the Post and Page menu items in admin menu bar.
     * The elements in the $menu[x] array are:
     *     0: Menu item name
     *     1: Minimum level or capability required.
     *     2: The URL of the item's file
     *     3: Class
     *     4: ID
     *     5: Icon for top level menu
    if (!function_exists('change_post_links')) {
    	function change_post_links() {
    		global $menu, $submenu, $wp_taxonomies;
    		// Unset Post & Page menus so we can change them
    		// Change menu order to reflect new positions
    		$menu[5] = array(__('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'wp-menu-open menu-top menu-icon-page', 'menu-pages', 'div');
    		$submenu['edit-pages.php'][5] = array(__('Edit'), 'edit_pages', 'edit.php?post_type=page');
    		$submenu['edit-pages.php'][10] = array(_c('Add New|page'), 'edit_pages', 'post-new.php?post_type=page');
    		$menu[20] = array(__('Posts'), 'edit_posts', 'edit.php', '', 'menu-top menu-icon-post', 'menu-posts', 'div');
    		$submenu['edit.php'][5]  = array(__('Edit'), 'edit_posts', 'edit.php');
    		$submenu['edit.php'][10]  = array(_c('Add New|post'), 'edit_posts', 'post-new.php');
    		$i = 15;
    		/*foreach ( $wp_taxonomies as $tax ) {
    			if ( $tax->hierarchical || ! in_array('post', (array) $tax->object_type, true) )
    			$submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
    		$submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'edit-tags.php?taxonomy=category' );*/
    add_action('admin_menu', 'change_post_links');

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: cms-like-admin-menu ] Broken: URLs are wrong, icons are missing’ is closed to new replies.