WordPress.org

Ready to get started?Download WordPress

Forums

hide manage-tab in the admin area: (2 posts)

  1. to_ul
    Member
    Posted 7 years ago #

    hi...the following post shows how to hide the manage-tab in the admin area.
    first i have done it manually in the wp-admin/menu.php
    this works fine, but i will understand what going on! can someone explain what "2" mean?

    $menu[10] = array(__('Manage'), 2, 'edit.php');

    and the plugin-idea, i can't get it working!
    <?php
    /*
    Plugin Name: Unmanage Posts
    Description: Require manage_posts capability to manage posts
    Author: Owen Winkler
    Version: 1.0
    Author URI: asymptomatic.net/
    */
    add_action('admin_menu', 'my_admin_menu');
    add_filter('capabilities_list', 'my_caps_list');
    // Redefine some menu cap requirements:
    function my_admin_menu() {
    // Make the menu variables accessable here:
    global $menu, $submenu;
    $submenu['edit.php'][5] = array(__('Posts'), 'manage_posts', 'edit.php');
    }
    // Define a new capability for the Role Manager to use:
    function my_caps_list($caps) {
    $caps[] = 'manage_posts';
    return $caps;
    }
    ?>

    what have i done wrong?

    cheers!

  2. to_ul
    Member
    Posted 7 years ago #

    ooohhh i solved the 2nd problem:
    i have to post the code as blank-text....

Topic Closed

This topic has been closed to new replies.

About this Topic