diff --git src/wp-includes/update.php src/wp-includes/update.php
index e23811b..f065d09 100644
|
|
|
function wp_clean_update_cache() { |
| 736 | 736 | delete_site_transient( 'update_core' ); |
| 737 | 737 | } |
| 738 | 738 | |
| | 739 | /** |
| | 740 | * Reset PHP opcache |
| | 741 | * |
| | 742 | * @since 4.9.5 |
| | 743 | */ |
| | 744 | function wp_opcache_reset() { |
| | 745 | if ( ! function_exists( 'opcache_reset' ) ) { |
| | 746 | return; |
| | 747 | } |
| | 748 | |
| | 749 | if ( ! empty( ini_get( 'opcache.restrict_api' ) ) && strpos( __FILE__, ini_get( 'opcache.restrict_api' ) ) !== 0 ) { |
| | 750 | return; |
| | 751 | } |
| | 752 | |
| | 753 | opcache_reset(); |
| | 754 | } |
| | 755 | |
| 739 | 756 | if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) { |
| 740 | 757 | return; |
| 741 | 758 | } |
| … |
… |
add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 ); |
| 760 | 777 | add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' ); |
| 761 | 778 | |
| 762 | 779 | add_action( 'init', 'wp_schedule_update_checks' ); |
| | 780 | |
| | 781 | add_action( 'upgrader_process_complete', 'wp_opcache_reset' ); |