Ticket #36383: 36383.patch
File 36383.patch, 3.4 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-upgrader.php
976 976 add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2); 977 977 add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); 978 978 //'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins. 979 // Clear cache so wp_update_plugins() knows about the new plugin. 980 add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 ); 979 981 980 982 $this->run( array( 981 983 'package' => $r->package, … … 990 992 ) ); 991 993 992 994 // Cleanup our hooks, in case something else does a upgrade on this connection. 995 remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 ); 993 996 remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade')); 994 997 remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); 995 998 … … 1032 1035 $current = get_site_transient( 'update_plugins' ); 1033 1036 1034 1037 add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); 1038 add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 ); 1035 1039 1036 1040 $this->skin->header(); 1037 1041 … … 1126 1130 $this->skin->footer(); 1127 1131 1128 1132 // Cleanup our hooks, in case something else does a upgrade on this connection. 1133 remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 ); 1129 1134 remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); 1130 1135 1131 1136 // Force refresh of plugin update information. … … 1544 1549 add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 1545 1550 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 1546 1551 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 1552 // Clear cache so wp_update_themes() knows about the new theme. 1553 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 1547 1554 1548 1555 $this->run( array( 1549 1556 'package' => $r['package'], … … 1557 1564 ), 1558 1565 ) ); 1559 1566 1567 remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 ); 1560 1568 remove_filter('upgrader_pre_install', array($this, 'current_before')); 1561 1569 remove_filter('upgrader_post_install', array($this, 'current_after')); 1562 1570 remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme')); … … 1601 1609 add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2); 1602 1610 add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2); 1603 1611 add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4); 1612 // Clear cache so wp_update_themes() knows about the new theme. 1613 add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 ); 1604 1614 1605 1615 $this->skin->header(); 1606 1616 … … 1677 1687 $this->skin->footer(); 1678 1688 1679 1689 // Cleanup our hooks, in case something else does a upgrade on this connection. 1690 remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 ); 1680 1691 remove_filter('upgrader_pre_install', array($this, 'current_before')); 1681 1692 remove_filter('upgrader_post_install', array($this, 'current_after')); 1682 1693 remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));