Starting from Plesk 12.0, there is an easy way to add custom buttons related to an extension. Previously, extension developers had to use CLI or XML API calls in post-install and pre-uninstall scripts for creating custom buttons.
To add custom buttons, you need to develop a class derived from pm_Hook_CustomButtons. The class must be placed in the directory
plib/hooks/. You can find the complete list of supported values for 'place' under 'Constants'.
The following example shows how to add several custom buttons:
You can set up custom buttons in the following places:
One button can be set up for multiple places at once. In some places, you can use such optional parameters as
description. You can specify both local and external hyperlinks.
You can find the sample code in our repository here.