Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global default menu #32

Open
swissspidy opened this issue Oct 6, 2015 · 6 comments
Open

Global default menu #32

swissspidy opened this issue Oct 6, 2015 · 6 comments

Comments

@swissspidy
Copy link
Collaborator

As per this request:

Ideally I would like to see the option to apply across to all users, like a default menu and then the user can overwrite the menu organization how they want, but that would just apply to them and no one else.

See also #25 (comment)

@NickHeurter
Copy link

This would be a very cool function!

@blogmom
Copy link

blogmom commented Oct 9, 2016

yes, user-specific customization of admin panel would be a dream come true. But.......... can you do this: for any New Item added by a user, append their userID and a unique number to the page slug of the new item, so that the ScreenID is unique. (i.e., toplevel_page_{page_slug} would be toplevel_page_userID_uniqnum https://codex.wordpress.org/Plugin_API/Admin_Screen_Reference Why? Then we could use add_meta_box to send widgets directly to that screen. By doing this, a user could create multiple unique dashboard pages (and move them around anywhere using your magic plugin) instead of having just one dashboard/Home page. Granted, there would need to be a clever way to give users a way to drag widgets onto the New Items, but we could probably find a way. The key is having unique ScreenIds.

@swissspidy
Copy link
Collaborator Author

@blogmom Sounds like that's worth a new issue.

for any New Item added by a user, append their userID and a unique number to the page slug of the new item, so that the ScreenID is unique. (i.e., toplevel_page_{page_slug} would be toplevel_page_userID_uniqnum

Perhaps we could, but I suspect this would break many things like stylesheets, capability checks, the menu item mapping, etc.

The key is having unique screen ids.

Can't you do something like if ( 123 === get_current_user_id() ) { add_meta_box(); } to set meta boxes per user?

@blogmom
Copy link

blogmom commented Oct 9, 2016

I suppose... but I want my users to freely choose their dashboard widgets (which they can do now) but with one of my clients, users also want ability to create multiple Dashboard pages (it would be like having vertical "tabs"). I have dreamed of this too, since the Dashboard was invented. But adding stuff to Dashboard is usually done with hard-coding to affect all users, until I discovered your magic AMM plugin. Wow, now users can Order their Admin Panel and create New Items, just wow!. But... how can they create a New Dashboard Page and add widgets to it? My idea is to have a unique ScreenID (similar to what happens with I create a new page using add_menu_page), but maybe I don't understand the solution you pasted....

@swissspidy
Copy link
Collaborator Author

swissspidy commented Oct 9, 2016

OK, I think now I got what you mean. Right now, the new items created by the plugin are simply external links. To make them real pages within the admin, AMM needs to use add_menu_page(). I now created a new issue #39 for that. Let's continue the discussion there.

Note that add_menu_page() is only half of the deal. To make a new dashboard page possible with widgets etc. you'd have to do much, much more. Nothing this plugin should do.

@blogmom
Copy link

blogmom commented Oct 9, 2016

Totally understand that AMM should not expand its scope to add widgets
to pages. But it would be HUGE (for me) to give users ability to add
Admin Menu Pages! I could try creating a plugin or a fancy page in the
Admin Top bar to add widgets to the pages.

Actually..... I know you have bigger fish to fry with AMM right
now. Let me please ask you this. I created a "New Page" button in
the admin top bar. When clicked, it can open a link. But what code
would I need to add in that link, to run "add_menu_page" and allow users
to create a new page themselves? I am totally stuck, spent hours
tinkering. I can only get add_menu_page to work within functions.php,
I can't figure out how to trigger it from other pages after the site is
rendered. If I could figure out how to give users a way to create a
dashboard page themselves, then AMM could be used for just sorting the
Menu items (assuming AMM can have an option to toggle between "full mode" and "sort only" modes).

On 10/9/2016 4:16 AM, Pascal Birchler wrote:

OK, I think now I got what you mean. Right new, the new items created
by the plugin are simply external links. To make them real pages
within the admin, AMM needs to use |add_menu_page()|. I now created a
new issue #39
#39 for
that. Let's continue the discussion there.

Note that |add_menu_page()| is only half of the deal. To make a new
dashboard page possible with widgets etc. you'd have to do much, much
more. Nothing this plugin should do.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#32 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVq2ycfdbUxa36b_mY-AfiC1UidYNPgAks5qyLD3gaJpZM4GJj2u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants