plugin-check icon indicating copy to clipboard operation
plugin-check copied to clipboard

Add multisite support for admin page

Open felixarntz opened this issue 2 years ago • 9 comments

Is your enhancement related to a problem? Please describe.

The admin screen from #32 and the plugin action link from #36 are not fully working in multisite yet, or rather, they are limited to the individual site's WP Admin UI. We should expand that so that the same admin screen works in the Network Admin UI as well.

This is particularly critical, since on some multisite configurations regular administrators are not allowed to control plugins.

Acceptance Criteria

  • The admin page class from #32 should be expanded to also add the same admin screen on the network_admin_menu action hook.
    • The admin page added can behave the same way for now, but since the "Tools" menu does not exist in the Network Admin, we should add the screen in the "Settings" menu there (i.e. use add_submenu_page() with settings.php).
  • The plugin action links from #36 should be expanded to also show up in the Network Admin via the network_admin_plugin_action_links filter.
    • Particular attention has to be paid to the URL, since the page lives under settings.php here (instead of options-general.php in the regular WP Admin).

Test Coverage

  • Ensure the admin page is added propertly when using the Network Admin specific action.
  • Ensure the plugin link is added properly when using the Network Admin specific filter.

felixarntz avatar Jan 25 '23 22:01 felixarntz

@jjgrainger Opened this additional issue for the future, with ACs to review.

felixarntz avatar Jan 25 '23 22:01 felixarntz

Would it be possible to please assign an estimate to this one @jjgrainger ?

eclarke1 avatar Feb 20 '23 13:02 eclarke1

@felixarntz @joemcgill @jjgrainger I have raised PR for this task here. Thanks!

vishalkakadiya avatar Feb 28 '23 11:02 vishalkakadiya

@vishalkakadiya @jjgrainger @eclarke1 Apologies for just spotting now that this is in milestone 1. I'm not sure that's a good idea because adding multisite support will entail more than this (e.g. making the AJAX requests correctly), and some of those other things will be more complicated. So if we only implement this issue, we would have a broken multisite support, which is probably worse than no multisite support at all.

I think we should focus on this only after we have a first working version and the repo is in the WordPress organization.

felixarntz avatar Feb 28 '23 15:02 felixarntz

Thanks @felixarntz I have removed Milestone 1 and added Milestone 2, presumably this can sit in CR until such a time it's needed. Or do you think it may need additional work, and therefore should be moved back to AC?

eclarke1 avatar Feb 28 '23 15:02 eclarke1

@eclarke1 I think it can remain in CR, it's just that we will need to work on additional issues to get full multisite support, and those need to be explored and defined eventually. Maybe we can eventually work on it in a feature branch.

felixarntz avatar Feb 28 '23 15:02 felixarntz

I have updated the PR status from open to draft so we don't merge it accidentally. 🙂

vishalkakadiya avatar Feb 28 '23 16:02 vishalkakadiya

I'm assigning this to @jjgrainger, so he can continue on this once we unblock. Thanks!

vishalkakadiya avatar Mar 02 '23 10:03 vishalkakadiya

Hey, I've recored this issue to continue the development from last time.

davidperezgar avatar Oct 02 '24 18:10 davidperezgar