WordPress.org

Support

Support » Plugins and Hacks » [Plugin: IM8 Box Hide] Meta boxes in WP3 Menu

[Plugin: IM8 Box Hide] Meta boxes in WP3 Menu

  • Hello,
    It is really amazing plugin, but it is a pitty it could not manage to hide some of meta boxes in WP new “Navigation Menu” system…

    Especially the meta boxes like: “Link Relationship (XFN)”, “Description”, sometimes maybe the “Theme Menu Location”, too. In other cases the “Categories” and other blog related options (for pure CMS WordPress site).

    I would be very happy if you are planning some small upgrade…
    🙂

    With best regards,
    Joo

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author intermedi8

    @intermedi8

    Thats because those are no “metaboxes”. The navigation menu page is hard-coded and not defined by an dynamic array, so it can not be manipulated.

    It is quite bad news…
    I am considering of hiding of those items via CSS (in spite of feeling that it is rather dirty and not quite flexible). Unfortunately the “labels” have not thair own IDs, so it would not be possible without modification of core files. I am really surprised it is so hardwired.

    Nevertheless, IM8 is superb!
    With regards, joo.

    Plugin Author intermedi8

    @intermedi8

    Yep, thats right. Hiding with CSS is not very good, and of course its not secure as it can easily bypassed. However it can be achived without modifying the core files when u use action hooks and javascript code. But next to the security aspect its also no good solution, as its not really “update safe”.

    Cant you just disable the whole screen? I dont get the reason for only disabling specific features of the menu screen?

    You are absolutely right, CSS/JS solution is really not bullet-proof, but it would be quite sufficient for hiding of these items for common users.

    Disabling of whole the screen probably is not ideal, too. I think it is a good idea to have a possibility to use “Link Target” etc.

    I was trying to use an “add_filter” technique, but I must be doing some stupid mistake – not working. Probably I still do not fully understand it (WP/PHP beginner 🙁 Just for your info – I looked into “wp-admin/includes/nav-menus.php” and found here:

    function wp_nav_menu_manage_columns() {
    return array( ‘title’ => _(‘Show advanced menu properties’), ‘cb’ => ”, ‘link-target’ => _(‘Link Target’), ‘css-classes’ => _(‘CSS Classes’), ‘xfn’ => _(‘Link Relationship (XFN)’), ‘description’ => _(‘Description’), );
    }

    In my “mytheme/function.php” I have inserted this:
    add_filter(‘wp_nav_menu_manage_columns’, ‘new_wp_nav_menu_manage_columns’);
    function new_wp_nav_menu_manage_columns() {
    return array( ‘title’ => _(‘Show advanced menu properties’),
    ‘cb’ => ”, ‘link-target’ => __(‘Link Target’) );
    }

    But as a result I can see the original “Screen Options” with all the items. If I remove the lines: ‘css-classes’ => _(‘CSS Classes’), ‘xfn’ => _(‘Link Relationship (XFN)’), ‘description’ => __(‘Description’), directly in WP core, everything looks OK, so I am not sure if it is possible to override all the WP functons this way. Neverheless, successful overriding of this function (outside of core – via some plugin or theme’s “function.php”) is probably a solution.

    With best regards, Milo

    joo-joo, you might want to check out the myEASYhider plugin. I think it does exactly what you’d like it to do. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: IM8 Box Hide] Meta boxes in WP3 Menu’ is closed to new replies.