Skip to content

Instantly share code, notes, and snippets.

@johnalarcon
Created October 16, 2020 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnalarcon/12745e6675f4d6a64ad8e37076b7bb68 to your computer and use it in GitHub Desktop.
Save johnalarcon/12745e6675f4d6a64ad8e37076b7bb68 to your computer and use it in GitHub Desktop.
Apply action after ClassicPress plugin update
if ($options['action'] == 'update') {
if ($options['type'] == 'plugin') {
if (!empty($options['plugins'])) {
if (in_array(plugin_basename(__FILE__), $options['plugins'], true)) {
// Do stuff.
}
}
}
}
}
add_action('upgrader_process_complete', 'codepotent_upgrade_completed', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment