Changeset 25307
- Timestamp:
- 09/09/2013 06:44:25 AM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/deprecated.php
r25209 r25307 1054 1054 _deprecated_function( __FUNCTION__, '3.6' ); 1055 1055 } 1056 1057 /** 1058 * This was once used to kick-off the Core Updater. 1059 * 1060 * Deprecated in favor of instantating a Core_Upgrader instance directly, 1061 * and calling the 'upgrade' method. 1062 * 1063 * @since 2.7.0 1064 * @deprecated 3.7.0 1065 */ 1066 function wp_update_core($current, $feedback = '') { 1067 _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' ); 1068 1069 if ( !empty($feedback) ) 1070 add_filter('update_feedback', $feedback); 1071 1072 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 1073 $upgrader = new Core_Upgrader(); 1074 return $upgrader->upgrade($current); 1075 1076 } 1077 1078 /** 1079 * This was once used to kick-off the Plugin Updater. 1080 * 1081 * Deprecated in favor of instantating a Plugin_Upgrader instance directly, 1082 * and calling the 'upgrade' method. 1083 * Unused since 2.8.0. 1084 * 1085 * @since 2.5.0 1086 * @deprecated 3.7.0 1087 */ 1088 function wp_update_plugin($plugin, $feedback = '') { 1089 _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' ); 1090 1091 if ( !empty($feedback) ) 1092 add_filter('update_feedback', $feedback); 1093 1094 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 1095 $upgrader = new Plugin_Upgrader(); 1096 return $upgrader->upgrade($plugin); 1097 } 1098 1099 /** 1100 * This was once used to kick-off the Plugin Updater. 1101 * 1102 * Deprecated in favor of instantating a Plugin_Upgrader instance directly, 1103 * and calling the 'upgrade' method. 1104 * Unused since 2.8.0. 1105 * 1106 * @since 2.7.0 1107 * @deprecated 3.7.0 1108 */ 1109 function wp_update_theme($theme, $feedback = '') { 1110 _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' ); 1111 1112 if ( !empty($feedback) ) 1113 add_filter('update_feedback', $feedback); 1114 1115 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 1116 $upgrader = new Theme_Upgrader(); 1117 return $upgrader->upgrade($theme); 1118 } -
trunk/src/wp-admin/includes/update-core.php
r25020 r25307 874 874 return; 875 875 876 // Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.876 // Ensure we only run this on the update-core.php page. The Core_Upgrader may be used in other contexts. 877 877 if ( 'update-core.php' != $pagenow ) 878 878 return; -
trunk/src/wp-admin/includes/update.php
r25256 r25307 6 6 * @subpackage Administration 7 7 */ 8 9 // The admin side of our 1.1 update system10 8 11 9 /** … … 221 219 } 222 220 223 function wp_update_plugin($plugin, $feedback = '') {224 if ( !empty($feedback) )225 add_filter('update_feedback', $feedback);226 227 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';228 $upgrader = new Plugin_Upgrader();229 return $upgrader->upgrade($plugin);230 }231 232 221 function get_theme_updates() { 233 222 $themes = wp_get_themes(); … … 244 233 245 234 return $update_themes; 246 }247 248 function wp_update_theme($theme, $feedback = '') {249 if ( !empty($feedback) )250 add_filter('update_feedback', $feedback);251 252 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';253 $upgrader = new Theme_Upgrader();254 return $upgrader->upgrade($theme);255 235 } 256 236 … … 295 275 } 296 276 297 function wp_update_core($current, $feedback = '') {298 if ( !empty($feedback) )299 add_filter('update_feedback', $feedback);300 301 include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';302 $upgrader = new Core_Upgrader();303 return $upgrader->upgrade($current);304 305 }306 307 277 function maintenance_nag() { 308 278 global $upgrading; -
trunk/src/wp-admin/update-core.php
r25219 r25307 315 315 global $wp_filesystem; 316 316 317 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 318 317 319 if ( $reinstall ) 318 320 $url = 'update-core.php?action=do-core-reinstall'; … … 348 350 $update->response = 'reinstall'; 349 351 350 $result = wp_update_core($update, 'show_message'); 352 add_filter( 'update_feedback', 'show_message' ); 353 354 $upgrader = new Core_Upgrader(); 355 $result = $upgrader->upgrade( $update ); 351 356 352 357 if ( is_wp_error($result) ) {
Note: See TracChangeset
for help on using the changeset viewer.