Changeset 15871
- Timestamp:
- 10/20/2010 04:38:00 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r15867 r15871 1038 1038 $update_actions = array( 1039 1039 'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>', 1040 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'1040 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>' 1041 1041 ); 1042 1042 if ( $this->plugin_active ) … … 1196 1196 parent::bulk_footer(); 1197 1197 $update_actions = array( 1198 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>',1199 'updates_page' => '<a href="' . admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'1198 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>', 1199 'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 1200 1200 ); 1201 1201 -
trunk/wp-admin/network/menu.php
r15869 r15871 11 11 $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); 12 12 13 $plugin_update_count = 0;13 $plugin_update_count = $theme_update_count = $wordpress_update_count = 0; 14 14 $update_plugins = get_site_transient( 'update_plugins' ); 15 15 if ( !empty($update_plugins->response) ) … … 22 22 23 23 $menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div'); 24 $menu[30] = array(__('Update'), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div'); 24 25 $update_themes = get_site_transient( 'update_themes' ); 26 if ( !empty($update_themes->response) ) 27 $theme_update_count = count( $update_themes->response ); 28 $update_wordpress = get_core_updates( array('dismissed' => false) ); 29 if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) ) 30 $wordpress_update_count = 1; 31 32 $update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count; 33 $update_title = array(); 34 if ( $wordpress_update_count ) 35 $update_title[] = sprintf(__('%d WordPress Update'), $wordpress_update_count); 36 if ( $plugin_update_count ) 37 $update_title[] = sprintf(_n('%d Plugin Update', '%d Plugin Updates', $plugin_update_count), $plugin_update_count); 38 if ( $theme_update_count ) 39 $update_title[] = sprintf(_n('%d Theme Update', '%d Themes Updates', $theme_update_count), $theme_update_count); 40 41 $update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : ''; 42 43 $menu[30] = array(sprintf( __('Update %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div'); 44 $submenu[ 'upgrade.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'install_plugins', 'update-core.php'); 45 $submenu[ 'upgrade.php' ][15] = array( __( 'Update Network' ), 'manage_network', 'upgrade.php' ); 46 unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress); 47 25 48 26 49 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); -
trunk/wp-admin/update-core.php
r15473 r15871 393 393 if ( 'upgrade-core' == $action ) { 394 394 wp_version_check(); 395 require_once( './admin-header.php');395 require_once(ABSPATH . 'wp-admin/admin-header.php'); 396 396 core_upgrade_preamble(); 397 397 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { … … 405 405 do_undismiss_core_update(); 406 406 407 require_once( './admin-header.php');407 require_once(ABSPATH . 'wp-admin/admin-header.php'); 408 408 if ( 'do-core-reinstall' == $action ) 409 409 $reinstall = true; … … 431 431 $title = __('Update Plugins'); 432 432 433 require_once( './admin-header.php');433 require_once(ABSPATH . 'wp-admin/admin-header.php'); 434 434 echo '<div class="wrap">'; 435 435 screen_icon('plugins'); … … 454 454 $title = __('Update Themes'); 455 455 456 require_once( './admin-header.php');456 require_once(ABSPATH . 'wp-admin/admin-header.php'); 457 457 echo '<div class="wrap">'; 458 458 screen_icon('themes'); … … 462 462 } 463 463 464 include( './admin-footer.php');464 include(ABSPATH . 'wp-admin/admin-footer.php');
Note: See TracChangeset
for help on using the changeset viewer.