Ticket #15525: 15525.2.patch
File 15525.2.patch, 6.2 KB (added by , 15 years ago) |
---|
-
wp-includes/admin-bar.php
275 275 276 276 $update_title = sprintf( __('Updates %s'), "<span id='ab-updates' class='count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ); 277 277 278 $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => admin_url('update-core.php') ) ); 278 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 279 280 $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => $href ) ); 279 281 } 280 282 281 283 /** -
wp-admin/includes/update.php
98 98 if ( ! isset( $cur->response ) ) 99 99 $cur->response = ''; 100 100 101 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 102 101 103 switch ( $cur->response ) { 102 104 case 'development' : 103 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], 'update-core.php');105 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href ); 104 106 break; 105 107 106 108 case 'upgrade' : 107 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', 'update-core.php', $cur->current);109 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current); 108 110 break; 109 111 110 112 case 'latest' : … … 129 131 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) 130 132 return false; 131 133 132 if ( current_user_can('update_core') ) 133 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, 'update-core.php' ); 134 else 134 if ( current_user_can('update_core') ) { 135 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 136 137 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, $href ); 138 } else 135 139 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); 136 140 137 141 echo "<div class='update-nag'>$msg</div>"; … … 146 150 $cur = get_preferred_from_update_core(); 147 151 148 152 $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] ); 149 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') )150 $msg .= " <a href='update-core.php' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';151 153 154 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { 155 $href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ); 156 $msg .= " <a href='" . $href . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 157 } 158 152 159 echo "<span id='wp-version-message'>$msg</span>"; 153 160 } 154 161 -
wp-admin/theme-editor.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() && ! is_network_admin() ) 13 wp_redirect( network_admin_url( 'theme-editor.php') ); 14 12 15 if ( !current_user_can('edit_themes') ) 13 16 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site.').'</p>'); 14 17 -
wp-admin/plugin-install.php
12 12 /** WordPress Administration Bootstrap */ 13 13 require_once('./admin.php'); 14 14 15 if ( is_multisite() && ! is_network_admin() ) 16 wp_redirect( network_admin_url( 'plugin-install.php') ); 17 15 18 $wp_list_table = get_list_table('WP_Plugin_Install_List_Table'); 16 19 $wp_list_table->check_permissions(); 17 20 $wp_list_table->prepare_items(); -
wp-admin/theme-install.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() && ! is_network_admin() ) 13 wp_redirect( network_admin_url( 'theme-install.php') ); 14 12 15 $wp_list_table = get_list_table('WP_Theme_Install_List_Table'); 13 16 $wp_list_table->check_permissions(); 14 17 $wp_list_table->prepare_items(); -
wp-admin/update-core.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() && ! is_network_admin() ) 13 wp_redirect( network_admin_url( 'update-core.php') ); 14 12 15 if ( ! current_user_can('update_plugins') ) 13 16 wp_die(__('You do not have sufficient permissions to update plugins for this site.')); 14 17 … … 327 330 } 328 331 ?> 329 332 <div class="wrap"> 330 <?php screen_icon( ); ?>333 <?php screen_icon( 'tools' ); ?> 331 334 <h2><?php _e('Update WordPress'); ?></h2> 332 335 <?php 333 336 if ( $wp_filesystem->errors->get_error_code() ) { -
wp-admin/plugin-editor.php
9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() && ! is_network_admin() ) 13 wp_redirect( network_admin_url( 'plugin-editor.php') ); 14 12 15 if ( !current_user_can('edit_plugins') ) 13 16 wp_die( __('You do not have sufficient permissions to edit plugins for this site.') ); 14 17