Plugin Directory

Changeset 2592008


Ignore:
Timestamp:
09/01/2021 10:54:54 AM (5 years ago)
Author:
veks
Message:

обновление 2.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • button-visually-impaired/trunk/functions.php

    r2591995 r2592008  
    99    } );
    1010}
     11
     12add_action( 'upgrader_process_complete', function ( $upgrader_object, $options ) {
     13    // The path to our plugin's main file
     14    $our_plugin = plugin_basename( __FILE__ );
     15
     16    // If an update has taken place and the updated type is plugins and the plugins element exists
     17    if ( $options['action'] === 'update' && $options['type'] === 'plugin' && isset( $options['plugins'] ) ) {
     18
     19        // Iterate through the plugins being updated and check if ours is there
     20        foreach ( $options['plugins'] as $plugin ) {
     21
     22            if ( $plugin == $our_plugin ) {
     23                Bvi\Core\Activate::getInstance()->activation();
     24            }
     25        }
     26    }
     27} );
Note: See TracChangeset for help on using the changeset viewer.