Ticket #3706 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Admin Menu Hooks confusing

Reported by: mattyrob Assigned to: anonymous
Priority: low Milestone: 2.1.3
Component: Administration Version: 2.1
Severity: minor Keywords: needs-patch
Cc:

Description

With the release of 2.1 the menu structure change so that admin level users got a User menu and subscriber level users go a Profile menu.

If you use add_submenu_page and specify hooking into users.php this works and is only visible to admins.

If you change this to hooking in to profile.php the menu is visible to subscribers under Profile AND admins under Users.

I don't think it should be visible to admins as profile is not a main menu for admins so how can you specify a submenu?

This issue is affecting my plugin quite drastically as I dynamically link to this page from within the content of the blog. It's impossible to specify the link if it's moving!

Change History

01/29/07 22:05:07 changed by foolswisdom

mattyrob, I imagine the details are sufficient to the core developers, but to allow others to try to help, maybe even including which plugin this affects will inspire more participation?

01/30/07 00:10:15 changed by foolswisdom

Oh, just catching up on wp-testers and found your post naming the plugin Subscribe2
http://comox.textdrive.com/pipermail/wp-testers/2007-January/003965.html
Excellent!

01/31/07 20:59:46 changed by mattyrob

  • priority changed from normal to low.
  • severity changed from major to minor.

I've managed to implement a workaround on my plugin that changes the substituted link based upon the user capability level in WordPress.

if (current_user_can('manage_options')) {
	$this->s2form = $this->use_profile_admin; //use admin form link
} else {
	$this->s2form = $this->use_profile_users; //use users form link
}

From my point of view though this is still something that could be tidie up in the backend as linking in to 2 menus for 1 purpose that only changes depending on user capability seems backwards. It also generates essentially unecessary code in plugins.

02/01/07 00:03:56 changed by ryan

I'm not too fond of the current behavior either. I'll try to muster consensus on changing it back.

02/01/07 10:26:38 changed by markjaquith

We could also just API the function (add_users_page()) and do the logic test there.

Or we could change it so that the profile is the default item. I don't think anyone is going to stage a protest over one additional click to get to the Authors and Users page.

02/01/07 19:27:58 changed by mattyrob

I think I'd support reverting to Users or to implementing add_users_page() rather than making Profile the default.

two reasons for not making Profile default:

1/ It doesn't make sense in the admin panel - meaning the title Profile is not a correct description of the menu contents 2/ Visually it would be too many "Ps" with Presentation, Plugins and Profile all next to each other!

Just my pedantic mind at work :-)

02/21/07 16:02:14 changed by Nazgul

  • milestone changed from 2.1.1 to 2.1.2.

+1 for changing it back.

02/26/07 16:21:25 changed by markjaquith

  • keywords set to needs-patch.

+1 for add_users_page() API. That way we are free to change it in the future without harm.

02/27/07 01:54:36 changed by ryan

1

03/07/07 05:03:34 changed by markjaquith

  • status changed from new to closed.
  • resolution set to fixed.

(In [4987]) add_users_page() to address changing top-level menu item. fixes #3706

03/07/07 05:04:39 changed by markjaquith

(In [4988]) add_users_page() to address changing top-level menu item. fixes #3706