Ticket #27869: 27869.patch
File 27869.patch, 2.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/ajax-actions.php
2217 2217 wp_send_json_error(); 2218 2218 } 2219 2219 2220 $args = wp_parse_args( wp_unslash( $_REQUEST['request'] ), array( 2220 $request = wp_unslash( $_REQUEST['request'] ); 2221 $is_network = $request['is_network']; 2222 unset( $request['is_network'] ); 2223 2224 $args = wp_parse_args( $request, array( 2221 2225 'per_page' => 20, 2222 2226 'fields' => $theme_field_defaults 2223 2227 ) ); … … 2233 2237 wp_send_json_error(); 2234 2238 } 2235 2239 2236 $update_php = self_admin_url( 'update.php?action=install-theme' );2240 $update_php = $is_network ? network_admin_url( 'update.php?action=install-theme' ) : admin_url( 'update.php?action=install-theme' ); 2237 2241 foreach ( $api->themes as &$theme ) { 2238 2242 $theme->install_url = add_query_arg( array( 2239 2243 'theme' => $theme->slug, -
src/wp-admin/js/theme.js
318 318 data: { 319 319 // Request data 320 320 request: _.extend({ 321 is_network: themes.data.settings.isNetwork, 321 322 per_page: 100, 322 323 fields: { 323 324 description: true, -
src/wp-admin/theme-install.php
46 46 'isInstall' => true, 47 47 'canInstall' => current_user_can( 'install_themes' ), 48 48 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, 49 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) 49 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ), 50 'isNetwork' => is_network_admin() 50 51 ), 51 52 'l10n' => array( 52 53 'addNew' => __( 'Add New Theme' ),