Before autoinstall plugins handled postinstall functions by calling a plugin_postinstall function
Text Formatted Code
// give the plugin a chance to perform any post-install operations
if (function_exists ('plugin_postinstall')) {
if (!plugin_postinstall ()) {
$uninstall_plugin ();
return false;
}
}
What is the best way to do it now?
Ben
Re: Handle postinstall
Posted on: 12/06/11 04:03am By: Dirk
The postinstall[*1] function is still supported. Are you saying it doesn't work?
bye, Dirk
Re: Handle postinstall
Posted on: 12/06/11 07:00am By: ::Ben
As I do not found any function calling to plugin_postinstall in the system folder, I assume that authors of plugins must include the call somewhere.
The question is where?
Ben
Re: Handle postinstall
Posted on: 12/06/11 07:08am By: Dirk
It's called either from the install script or from admin/plugins.php - so that's why you won't find it in systems
Both the bundled Links and XMLSitemap plugins have a postinstall function in their autoinstall.php that you can refer to for examples.