To add custom buttons, you need to create a class inherited from
pm_Hook_CustomButtons.
The class must be placed in the directory plib/hooks/
. The place
parameter specifies the custom button’s location in the interface. You
can find the complete list of supported values for the place
parameter in the
Constants
section of the reference.
The following sample project is provided by Plesk to illustrate adding
an extension’s custom buttons in different locations in the interface:
https://github.com/plesk/ext-custom-buttons.
User Home Page
The PLACE_ADMIN_HOME
and PLACE_RESELLER_HOME
custom buttons are
placed on the Administrator’s and the Reseller’s home pages, in the
section Custom Buttons.
PLACE_CUSTOMER_HOME
is placed on Websites & Domains pages, in
the right sidebar, and is visible to all users.
Navigation Menu
PLACE_ADMIN_NAVIGATION
and PLACE_RESELLER_NAVIGATION
place
custom buttons in the Navigation Menu for the Administrator and the
Reseller correspondingly.
PLACE_HEADER_NAVIGATION
custom button appears in the header,
following the user name.