WordPress.org

Make WordPress Core

Changeset 18569


Ignore:
Timestamp:
08/18/11 22:40:37 (4 years ago)
Author:
nacin
Message:

Add 'Network Enable' link after installing a theme in the network admin. props PeteMall, fixes #18468.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r18525 r18569  
    13551355                            ); 
    13561356 
     1357        if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) 
     1358            $install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>'; 
     1359 
    13571360        if ( $this->type == 'web' ) 
    13581361            $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>'; 
  • trunk/wp-admin/network/themes.php

    r18092 r18569  
    4141            $allowed_themes[ $_GET['theme'] ] = true; 
    4242            update_site_option( 'allowedthemes', $allowed_themes ); 
    43             wp_redirect( add_query_arg( 'enabled', '1', $referer ) ); 
     43            wp_redirect( network_admin_url( 'themes.php?enabled=1' ) ); 
    4444            exit; 
    4545            break; 
Note: See TracChangeset for help on using the changeset viewer.