[wp-trac] [WordPress Trac] #42806: Allow installing themes in the Customizer on multisite
WordPress Trac
noreply at wordpress.org
Tue Dec 5 17:47:42 UTC 2017
#42806: Allow installing themes in the Customizer on multisite
-------------------------+-----------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version:
Severity: normal | Keywords: 2nd-opinion
Focuses: multisite |
-------------------------+-----------------------------
Currently the "Install Themes" section in the Customizer isn't added when
using multisite.
There is no technical problem with the installation process, as it still
works correctly, simply by adding removing the restriction to only add the
section (and enqueueing the related script) if `is_multisite()`, which I
tested before opening this ticket.
However, what would need to be figured out is how to deal with enabling
themes, because by default an installed themes isn't enabled anywhere. And
of course it would only be possible for the network administrator, but I
think that would still bring a huge benefit, because right now it isn't
possible in multisite at all.
Here are two suggestions for possible approaches:
1. When in a multisite, there could be a notification like "By installing
a theme you also automatically enable it for this site." Then, after the
installation logic we would only need to handle that part automatically.
If we go with that approach, we would need to make sure that the current
user has both the `install_themes` and `manage_network_themes`
capabilities.
2. When in a multisite, there could be a separate section "Network
Installed Themes" that includes all themes installed, regardless of
whether they're enabled for the site. Each themes would have a button to
enable/disable it for the site. That section would require the user to
have the `manage_network_themes` capability. We would furthermore need to
ensure that themes are transitioned from the "Network Installed Themes" to
the existing "Installed Themes" section and vice-versa when they are
enabled/disabled for the site. Plus, when installing a theme through the
"WordPress.org Themes" section, the user would need to be redirected to
the "Network Installed Themes" section with that theme pre-seleted, to
easily be able to enable and preview it.
There are benefits to both ways: While the first approach will be much
simpler to implement, it somewhat mixes installing and enabling themes
into one. The latter approach will allow more flexibility, but may be
overly complex. Especially since installing themes without being able to
enable them will make the process useless in multisite, I think I prefer
the first approach. Maybe a mix of both could be the right way too, where
we start with implementing the first approach as a first iteration (that
could even be merged into core as that), but keeping it future-compatible
to possibly add a dedicated "Network Installed Themes" section later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42806>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list