[wp-trac] [WordPress Trac] #30594: New function to network activate a theme
WordPress Trac
noreply at wordpress.org
Thu Dec 4 14:44:27 UTC 2014
#30594: New function to network activate a theme
---------------------------------------+-----------------------------
Reporter: igmoweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Keywords:
Focuses: administration, multisite |
---------------------------------------+-----------------------------
I haven't found any ticket asking about this but what if we create a new
function to network enable/disable a theme?
Right now, wp-admin/themes.php is doing the following thing to enable
themes in a network:
{{{
...
$allowed_themes = get_site_option( 'allowedthemes' );
switch ( $action ) {
case 'enable':
check_admin_referer('enable-theme_' .
$_GET['theme']);
$allowed_themes[ $_GET['theme'] ] = true;
update_site_option( 'allowedthemes',
$allowed_themes );
...
}}}
We could encapsulate that in new functions, one to enabling and another to
disabling.
Just in case, the code was pretty easy so I upload here a patch.
Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30594>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list