When a plugin is activated, the action activate_name hook is called.

name is replaced by the actual file name of the plugin being activated. So if the plugin is located at 'public/plugins/SamplePlugin.php', then the hook will call 'activate_Sample'.


  • Full name: register_activation_hook
  • Defined in: cms/core/Shared/Helpers/plugin.php

Parameters

Parameter Type Description
$filename string Plugin's filename.
$function mixed The function that should be triggered by the hook.

Return Value

void