在加载 Create New Addon 页面时执行。
参数
变量 | 类型 | 注意 |
---|---|---|
这个hook功能没有参数。 |
响应
用于创建预定义插件面板的值数组。请参阅数组结构的示例。
示例代码
<?php
/**
* Setting the 'icontype' value to 'fa' allows for the use of Font Awesome icons.
*/
add_hook('AdminPredefinedAddons', 1, function () {
return [
[
'module' => 'yourmodule',
'icontype' => 'fa',
'iconvalue' => 'fad fa-cube',
'labeltype' => 'success',
'labelvalue' => 'Sample Label',
'paneltitle' => 'Sample Title',
'paneldescription' => 'Description to be displayed in the Predefined Addon panel.',
'addonname' => 'On addon creation, this value will be used as the addon name.',
'addondescription' => 'On addon creation, this value will be used as the addon description.',
'welcomeemail' => 'Hosting Account Welcome Email',
'featureaddon' => 'Name of feature addon as stored in the database.',
],
];
});
/**
* Alternatively the 'icontype' value can be set to 'url' to allow for the use of URLs and file paths.
*/
add_hook('AdminPredefinedAddons', 1, function () {
return [
[
'module' => 'yourmodule',
'icontype' => 'url',
'iconvalue' => 'https://www.whmcs.com/images/logo.png',
'paneltitle' => 'Sample Title',
'paneldescription' => 'Description to be displayed in the Predefined Addon panel.',
'addonname' => 'On addon creation, this value will be used as the addon name.',
'addondescription' => 'On addon creation, this value will be used as the addon description.',
'featureaddon' => 'Name of feature addon as stored in the database.',
],
];
});
相关用法
- PHP WHMCS AdminProductConfigFields用法及代码示例
- PHP WHMCS AdminProductConfigFieldsSave用法及代码示例
- PHP WHMCS AdminAreaPage用法及代码示例
- PHP WHMCS AdminAreaViewTicketPage用法及代码示例
- PHP WHMCS AdminClientProfileTabFieldsSave用法及代码示例
- PHP WHMCS AdminAreaClientSummaryActionLinks用法及代码示例
- PHP WHMCS AdminClientServicesTabFieldsSave用法及代码示例
- PHP WHMCS AdminClientDomainsTabFieldsSave用法及代码示例
- PHP WHMCS AdminHomepage用法及代码示例
- PHP WHMCS AdminAreaViewQuotePage用法及代码示例
- PHP WHMCS AdminAreaHeaderOutput用法及代码示例
- PHP WHMCS AdminSupportTicketPagePreTickets用法及代码示例
- PHP WHMCS AdminInvoicesControlsOutput用法及代码示例
- PHP WHMCS AdminClientFileUpload用法及代码示例
- PHP WHMCS AdminLogin用法及代码示例
- PHP WHMCS AdminClientDomainsTabFields用法及代码示例
- PHP WHMCS AdminAreaFooterOutput用法及代码示例
- PHP WHMCS AdminAreaHeadOutput用法及代码示例
- PHP WHMCS AdminAreaClientSummaryPage用法及代码示例
- PHP WHMCS AdminClientServicesTabFields用法及代码示例
- PHP WHMCS AdminAreaViewTicketPageSidebar用法及代码示例
- PHP WHMCS AdminClientProfileTabFields用法及代码示例
- PHP WHMCS AdminLogout用法及代码示例
- PHP WHMCS AdminServiceEdit用法及代码示例
- PHP WHMCS AddonUnsuspended用法及代码示例
注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 AdminPredefinedAddons。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。