Ticket #15162: 15162.2.diff
| File 15162.2.diff, 6.5 KB (added by PeteMall, 3 years ago) |
|---|
-
wp-admin/includes/class-wp-upgrader.php
1037 1037 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 ) 1043 1043 unset( $update_actions['activate_plugin'] ); … … 1195 1195 function bulk_footer() { 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 1202 1202 $update_actions = apply_filters('update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info); -
wp-admin/network/menu.php
10 10 $menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div'); 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) ) 16 16 $plugin_update_count = count( $update_plugins->response ); … … 21 21 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');25 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 48 26 49 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); 27 50 28 51 $submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); -
wp-admin/network/update-core.php
1 <?php 2 3 require_once( './admin.php' ); 4 5 require( '../update-core.php' ); 6 No newline at end of file -
wp-admin/update-core.php
392 392 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 ) { 398 398 check_admin_referer('upgrade-core'); … … 404 404 elseif ( isset( $_POST['undismiss'] ) ) 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; 410 410 else … … 430 430 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'); 436 436 echo '<h2>' . esc_html__('Update Plugins') . '</h2>'; … … 453 453 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'); 459 459 echo '<h2>' . esc_html__('Update Themes') . '</h2>'; … … 461 461 echo '</div>'; 462 462 } 463 463 464 include( './admin-footer.php');464 include(ABSPATH . 'wp-admin/admin-footer.php');
