Add 'Network Enable' link after installing a theme in the network admin. props PeteMall, fixes #18468.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e3117daaa8
commit
0fe8ea2f72
|
@ -1354,6 +1354,9 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
|||
'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'
|
||||
);
|
||||
|
||||
if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
|
||||
$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
|
||||
|
||||
if ( $this->type == 'web' )
|
||||
$install_actions['themes_page'] = '<a href="' . self_admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>';
|
||||
else
|
||||
|
|
|
@ -40,7 +40,7 @@ if ( $action ) {
|
|||
check_admin_referer('enable-theme_' . $_GET['theme']);
|
||||
$allowed_themes[ $_GET['theme'] ] = true;
|
||||
update_site_option( 'allowedthemes', $allowed_themes );
|
||||
wp_redirect( add_query_arg( 'enabled', '1', $referer ) );
|
||||
wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
|
||||
exit;
|
||||
break;
|
||||
case 'disable':
|
||||
|
|
Loading…
Reference in New Issue