WordPress.org

Make WordPress Core

Ticket #34029: 34029.patch

File 34029.patch, 1.5 KB (added by ocean90, 5 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    844844                $this->install_strings();
    845845
    846846                add_filter('upgrader_source_selection', array($this, 'check_package') );
     847                // Clear cache so wp_update_plugins() knows about the new plugin.
     848                add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
    847849
    848850                $this->run( array(
    849851                        'package' => $package,
     
    856858                        )
    857859                ) );
    858860
     861                remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
    859862                remove_filter('upgrader_source_selection', array($this, 'check_package') );
    860863
    861864                if ( ! $this->result || is_wp_error($this->result) )
     
    14081411
    14091412                add_filter('upgrader_source_selection', array($this, 'check_package') );
    14101413                add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3);
     1414                // Clear cache so wp_update_themes() knows about the new theme.
     1415                add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
    14111416
    14121417                $this->run( array(
    14131418                        'package' => $package,
     
    14201425                        ),
    14211426                ) );
    14221427
     1428                remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
    14231429                remove_filter('upgrader_source_selection', array($this, 'check_package') );
    14241430                remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'));
    14251431