The MU forums have moved to WordPress.org

Hiding plugin's submenus (9 posts)

  1. boonika
    Member
    Posted 15 years ago #

    Hi! I would like to hide some of plugin's Admin submenus. If you have any ideas, please let me know. I know how to hide default Admin menus but I'm stuck with this. This is how plugin creates them.

    add_submenu_page(__FILE__, __('Manage Categories'), __('Manage Categories'), 'manage_options', 'manage-categories', 'manage_categories');
    add_submenu_page(__FILE__, __('Calendar Config'), __('Calendar Options'), 'manage_options', 'calendar-config', 'edit_calendar_config');

    Thanks!

  2. Klark0
    Member
    Posted 15 years ago #

    Just delete the entire line ?

  3. andrea_r
    Moderator
    Posted 15 years ago #

    If you don't need them at all, just remove those lines from the plugin.

  4. boonika
    Member
    Posted 15 years ago #

    I tried it, but the plugin won't work correctly (unable to sane calendar event). Obviously those menus provide some default settings (default calendar category for example) that are needed for this plugin to work properly. Maybe it makes no sense to you but as soon as I've returned those lines everything was working fine again.

  5. Klark0
    Member
    Posted 15 years ago #

    which plugin is it. I'll install on my test site and take a look.

  6. boonika
    Member
    Posted 15 years ago #

  7. boonika
    Member
    Posted 15 years ago #

    @Klarko - Any news?

  8. Klark0
    Member
    Posted 15 years ago #

    I assume you're trying to hide the Options page from users?
    I remove the line for it:
    add_submenu_page(__FILE__, __('Calendar Config'), __('Calendar Options'), 'manage_options', 'calendar-config', 'edit_calendar_config');

    And everything still works fine including the default category.

  9. boonika
    Member
    Posted 15 years ago #

    Thanks:) Actually I also wanted to hide 'Category Options' but it can wait. Thanks for your effort.

About this Topic