The MU forums have moved to WordPress.org

Site Admin Menu Plugin (5 posts)

  1. sturdyindian
    Member
    Posted 14 years ago #

    Hi

    How can a create a plugin for a menu which shown only to the site admin.Not for other users.

    Thanks
    Pradeep

  2. tim.moore
    Member
    Posted 14 years ago #

  3. andrea_r
    Moderator
    Posted 14 years ago #

    Or look at a plugin that does this and do what they did.

  4. sturdyindian
    Member
    Posted 14 years ago #

    Hi tim.moore
    I followed the same method.But even if i logged in as other user than site admin it is getting shown to them as well.

  5. tim.moore
    Member
    Posted 14 years ago #

    Ok, try this:

    function add_siteadmin_page() {
       add_submenu_page('wpmu-admin.php',
                        'Name of Page',
                        'Name of Page',
                        10,
                        'function_that_outputs_page',
                        'function_that_outputs_page');
    }
    
    add_action( 'admin_menu', 'add_siteadmin_page' );

    You should create a function that displays the options page and replace the function_that_outputs_page with the name of your output function.

About this Topic

  • Started 14 years ago by sturdyindian
  • Latest reply from tim.moore