Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#40651 new feature request

Plugins: Make it easier to find plugin settings after install

Reported by: melchoyce's profile melchoyce Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: ui, administration Cc:

Description

After installing new plugins, I invariably end up spending time hunting down wherever I need to configure or use it. Some plugins add a "Settings" link to their plugin card (very useful!) but this isn't always the case. It would be great to find a way to direct people to the settings screens upon activation.

Change History (2)

#1 @westonruter
7 years ago

Work on this feature currently exists in the form of a plugin: Show Plugin Menu Items on Activation. See also writeup on WP Tavern.

I chatted with @kellenmace about whether the plugin could be proposed as a feature plugin to start iterating for core merge, and he was supportive. So the next steps would be to test that plugin and identify any functional issues that should be fixed. Afterward we can reformulate into a core patch.

#2 @kellenmace
7 years ago

Thanks for the recommendation @melchoyce, and for linking to the plugin @westonruter. The Show Plugin Menu Items on Activation plugin was my solution to this issue. It essentially stores a copy of the global $menu and $submenu arrays before the plugin(s) is activated, then after it is activated, accesses those global arrays again and does a diff to determine which are the newly added menu items. It then shows admin pointers if there are 1-3 new menu items, or displays a notice stating that there are none (0) or many (4 or more). If this feature were rolled into core, I expect that both the process for determining which menu items are new and indicating the new ones would likely be different. But perhaps my plugin can serve as an example of how such a feature could work.

I think if a feature like this were rolled into core, it may make sense to do it this way:

  • Add an action inside of the add_menu_page() and add_submenu_page() functions that captures and saves the original data as each menu item is added.
  • Hook a function to an action hook that fires after all menu items have been added and all the menu data to the options table.
  • Hook another function to that same action hook that checks to see if any plugins have been activated. If they have, it could get the saved data from the options table and compare it with the newly generated menu data for the current page load and compare them to determine which item items are new.

That would be a cleaner way of doing it rather than relying on the global $menu and $submenu arrays like my plugin does, since some of those menu items contain HTML tags and other data. So capturing the original data from when menu items were originally added using add_menu_page() and add_submenu_page() would be preferable.

Lastly, this same feature could be expanded to work for themes as well, where WP would notify users of any newly added menu items after a theme is activated. Maybe that's beyond the scope of this ticket, though, based on the title.

Last edited 7 years ago by kellenmace (previous) (diff)
Note: See TracTickets for help on using tickets.