Changeset 15867
- Timestamp:
- 10/20/2010 02:16:03 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r15469 r15867 1282 1282 $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>'; 1283 1283 1284 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) 1284 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { 1285 1285 $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 1286 unset( $install_actions['activate_plugin'] ); 1287 } 1286 1288 1287 1289 if ( 'import' == $from ) 1288 1290 $install_actions['importers_page'] = '<a href="' . admin_url('import.php') . '" title="' . esc_attr__('Return to Importers') . '" target="_parent">' . __('Return to Importers') . '</a>'; 1289 1291 else if ( $this->type == 'web' ) 1290 $install_actions['plugins_page'] = '<a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>';1292 $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>'; 1291 1293 else 1292 $install_actions['plugins_page'] = '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';1294 $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'; 1293 1295 1294 1296 -
trunk/wp-admin/includes/plugin-install.php
r15519 r15867 102 102 foreach ( (array)$api_tags as $tag ) 103 103 $tags[ $tag['name'] ] = (object) array( 104 'link' => esc_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),104 'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ), 105 105 'name' => $tag['name'], 106 106 'id' => sanitize_title_with_dashes($tag['name']), … … 144 144 <h4><?php _e('Install a plugin in .zip format') ?></h4> 145 145 <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.') ?></p> 146 <form method="post" enctype="multipart/form-data" action="<?php echo admin_url('update.php?action=upload-plugin') ?>">146 <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-plugin') ?>"> 147 147 <?php wp_nonce_field( 'plugin-upload') ?> 148 148 <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label> … … 196 196 $version = $plugin->new_version; 197 197 if ( current_user_can('update_plugins') ) 198 $url = wp_nonce_url( admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file);198 $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file); 199 199 break; 200 200 } … … 207 207 if ( empty($installed_plugin) ) { 208 208 if ( current_user_can('install_plugins') ) 209 $url = wp_nonce_url( admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);209 $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 210 210 } else { 211 211 $key = array_shift( $key = array_keys($installed_plugin) ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers … … 227 227 // "install" & no directory with that slug 228 228 if ( current_user_can('install_plugins') ) 229 $url = wp_nonce_url( admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);229 $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 230 230 } 231 231 } -
trunk/wp-admin/includes/update.php
r15300 r15867 191 191 $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags ); 192 192 193 $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');193 $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800'); 194 194 195 195 echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">'; … … 199 199 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic upgrade is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); 200 200 else 201 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( 'update.php?action=upgrade-plugin&plugin='. $file, 'upgrade-plugin_' . $file) );201 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) ); 202 202 203 203 do_action( "in_plugin_update_message-$file", $plugin_data, $r ); -
trunk/wp-admin/network/menu.php
r15853 r15867 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 $menu[20] = array(__('Plugins'), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div'); 12 13 $plugin_update_count = 0; 14 $update_plugins = get_site_transient( 'update_plugins' ); 15 if ( !empty($update_plugins->response) ) 16 $plugin_update_count = count( $update_plugins->response ); 17 $menu[20] = array(sprintf( __('Plugins %s'), "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div'); 18 $submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' ); 19 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin editor'), 'install_plugins', 'plugin-install.php' ); 20 $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 21 22 13 23 $menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div'); 14 24 $menu[30] = array(__('Update'), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div'); … … 16 26 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); 17 27 18 $compat = array(); 19 $submenu = array(); 20 21 $submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' ); 22 $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 23 24 $submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); 28 $submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); 25 29 $submenu['themes.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_themes', 'theme-editor.php' ); 26 30 -
trunk/wp-admin/plugin-install.php
r15578 r15867 36 36 ); 37 37 38 include( './admin-header.php');38 include(ABSPATH . 'wp-admin/admin-header.php'); 39 39 ?> 40 40 <div class="wrap"> … … 48 48 </div> 49 49 <?php 50 include( './admin-footer.php');50 include(ABSPATH . 'wp-admin/admin-footer.php'); 51 51 -
trunk/wp-admin/update.php
r15834 r15867 55 55 $parent_file = 'plugins.php'; 56 56 $submenu_file = 'plugins.php'; 57 require_once( './admin-header.php');57 require_once(ABSPATH . 'wp-admin/admin-header.php'); 58 58 59 59 $nonce = 'upgrade-plugin_' . $plugin; … … 63 63 $upgrader->upgrade($plugin); 64 64 65 include( './admin-footer.php');65 include(ABSPATH . 'wp-admin/admin-footer.php'); 66 66 67 67 } elseif ('activate-plugin' == $action ) { … … 108 108 $parent_file = 'plugins.php'; 109 109 $submenu_file = 'plugin-install.php'; 110 require_once( './admin-header.php');110 require_once(ABSPATH . 'wp-admin/admin-header.php'); 111 111 112 112 $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); … … 121 121 $upgrader->install($api->download_link); 122 122 123 include( './admin-footer.php');123 include(ABSPATH . 'wp-admin/admin-footer.php'); 124 124 125 125 } elseif ( 'upload-plugin' == $action ) { … … 135 135 $parent_file = 'plugins.php'; 136 136 $submenu_file = 'plugin-install.php'; 137 require_once( './admin-header.php');137 require_once(ABSPATH . 'wp-admin/admin-header.php'); 138 138 139 139 $title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) ); … … 145 145 $upgrader->install( $file_upload->package ); 146 146 147 include( './admin-footer.php');147 include(ABSPATH . 'wp-admin/admin-footer.php'); 148 148 149 149 } elseif ( 'upgrade-theme' == $action ) { … … 159 159 $parent_file = 'themes.php'; 160 160 $submenu_file = 'themes.php'; 161 require_once( './admin-header.php');161 require_once(ABSPATH . 'wp-admin/admin-header.php'); 162 162 163 163 $nonce = 'upgrade-theme_' . $theme; … … 167 167 $upgrader->upgrade($theme); 168 168 169 include( './admin-footer.php');169 include(ABSPATH . 'wp-admin/admin-footer.php'); 170 170 } elseif ( 'update-selected-themes' == $action ) { 171 171 if ( ! current_user_can( 'update_themes' ) ) … … 212 212 $parent_file = 'themes.php'; 213 213 $submenu_file = 'themes.php'; 214 require_once( './admin-header.php');214 require_once(ABSPATH . 'wp-admin/admin-header.php'); 215 215 216 216 $title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version ); … … 222 222 $upgrader->install($api->download_link); 223 223 224 include( './admin-footer.php');224 include(ABSPATH . 'wp-admin/admin-footer.php'); 225 225 226 226 } elseif ( 'upload-theme' == $action ) { … … 238 238 add_thickbox(); 239 239 wp_enqueue_script('theme-preview'); 240 require_once( './admin-header.php');240 require_once(ABSPATH . 'wp-admin/admin-header.php'); 241 241 242 242 $title = sprintf( __('Installing Theme from uploaded file: %s'), basename( $file_upload->filename ) ); … … 248 248 $upgrader->install( $file_upload->package ); 249 249 250 include( './admin-footer.php');250 include(ABSPATH . 'wp-admin/admin-footer.php'); 251 251 252 252 } else {
Note: See TracChangeset
for help on using the changeset viewer.