Admin Area
The following hooks are provided for Admin Area related events.
AdminAreaClientSummaryActionLinks
Allows returning of links for display on the client summary page in the Action Links section.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | The id of the user being displayed. |
Response
An array of links to be displayed.
Example Code
<?php
add_hook('AdminAreaClientSummaryActionLinks', 1, function($vars)
{
$links = [];
$user_id = $vars['user_id'];
if ($user_id-->0)
{
$links[] = '<a href="link url here">button title here</a>';
$links[] = '<a href="link url here">button title here</a>';
}
return $links;
});
AdminAreaClientSummaryPage
Allows returning of output for display on the client summary page.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | The id of the user being displayed. |
Response
Allows returning of output for display on the client summary page.
Example Code
<?php
add_hook('AdminAreaClientSummaryPage', 1, function($vars)
{
return 'You can add html or text output content here';
});
AdminAreaViewQuotePage
Executes as the quote is being viewed.
Parameters
Variable | Type | Notes |
---|---|---|
quote_id | int |
Response
Return the HTML to display on the View Quote page.
Example Code
<?php
add_hook('AdminAreaViewQuotePage', 1, function($vars)
{
return 'You can add html or text output content here';
});
AdminClientDomainsTabFields
Executes when a domain is being viewed in the Admin area.
Parameters
Variable | Type | Notes |
---|---|---|
domainid | int | the id of the domain being loaded |
additional_fields | array | Additional fields data |
Response
An array of key -> value parameters to output additional fields as required.
Example Code
<?php
add_hook('AdminClientDomainsTabFields', 1, function($vars)
{
return [
'Additional Field 1' ='<input type="text" name="additionalField[one]" class="form-control input-150">',
'Additional Field 2' ='<input type="text" name="additionalField[two]" class="form-control input-150">',
];
});
AdminClientDomainsTabFieldsSave
Executes when the Domains tab in the Admin area is being saved.
Parameters
Variable | Type | Notes |
---|---|---|
domainid | int | the id of the domain being saved |
additionalField | array | Additional fields data which is being saved |
Response
No response supported
Example Code
<?php
add_hook('AdminClientDomainsTabFieldsSave', 1, function($vars)
{
$additionalField = $vars["additionalField"];
//Save the data here
});
AdminClientFileUpload
Executes as a client file is being uploaded from the Client Summary.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | the user_id |
path | string | File Storage Path |
size | string | File Size |
type | string | File Type |
filename | string | File Original Name |
title | string | File New Name |
adminonly | bool | File only for admin or all users |
Response
No response supported
Example Code
<?php
add_hook('AdminClientFileUpload', 1, function($vars)
{
// Perform hook code here...
});
AdminClientProfileTabFields
Executes when a client profile is being viewed in the Admin area.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | the id of the client being loaded |
additional_fields | array | Additional fields data |
Response
An array of key -> value parameters to output additional fields as required.
Example Code
<?php
add_hook('AdminClientProfileTabFields', 1, function($vars)
{
return [
'Additional Field 1' ='<input type="text" name="additionalField[one]" class="form-control input-150">',
'Additional Field 2' ='<input type="text" name="additionalField[two]" class="form-control input-150">',
];
});
AdminClientProfileTabFieldsSave
Executes when the Profile tab in the Admin area is being saved.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | the id of the Client being saved |
additionalField | array | Additional fields data which is being saved |
Response
No response supported
Example Code
<?php
add_hook('AdminClientProfileTabFieldsSave', 1, function($vars)
{
$additionalField = $vars["additionalField"];
//Save the data here
});
AdminClientServicesTabFields
Executes when a client services is being viewed in the Admin area.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | the id of the Client |
service_id | int | the id of the Product/Service being loaded |
additional_fields | array | Additional fields data |
Response
An array of key -> value parameters to output additional fields as required.
Example Code
<?php
add_hook('AdminClientServicesTabFields', 1, function($vars)
{
return [
'Additional Field 1' ='<input type="text" name="additionalField[one]" class="form-control input-150">',
'Additional Field 2' ='<input type="text" name="additionalField[two]" class="form-control input-150">',
];
});
AdminClientServicesTabFieldsSave
Executes when the Services tab in the Admin area is being saved.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | the id of the Client being saved |
service_id | int | the id of the Product/Service being saved |
additionalField | array | Additional fields data which is being saved |
Response
No response supported
Example Code
<?php
add_hook('AdminClientServicesTabFieldsSave', 1, function($vars)
{
$additionalField = $vars["additionalField"];
//Save the data here
});
AdminHomepage
Allows returning of output for display on the admin homepage
Parameters
Variable | Type | Notes |
---|---|---|
No input parameters for this hook point. |
Response
Return the HTML to be output on the page.
Example Code
<?php
add_hook('AdminHomepage', 1, function($vars)
{
return 'HTML or Text Content will appear on the Admin Homepage';
});
AdminLogin
Executes when successful authentication of an admin user.
Parameters
Variable | Type | Notes |
---|---|---|
adminid | int | Admin ID |
username | string | Admin Username |
Response
No response supported
Example Code
<?php
add_hook('AdminLogin', 1, function($vars)
{
//Your Code here
});
AdminLogout
Execute When Admin log out.
Parameters
Variable | Type | Notes |
---|---|---|
adminid | int | Admin ID |
Response
No response supported
Example Code
<?php
add_hook('AdminLogout', 1, function($vars)
{
//Your Code here
});
AdminServiceEdit
Executes when the Service has been edited. After the changes have been made.
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | Admin ID |
service_id | int | Product/Service ID |
Response
No response supported
Example Code
<?php
add_hook('AdminServiceEdit', 1, function($vars)
{
//Your Code here
});
InvoiceCreationAdminArea
Executes as an invoice is being created/published in the admin area.
Parameters
Variable | Type | Notes |
---|---|---|
invoice_id | int | Invoice ID |
Response
No response supported
Example Code
<?php
add_hook('InvoiceCreationAdminArea', 1, function($vars)
{
//Your Code here
});
PreServiceEdit
Executes as the service is being saved, before any changes have been made.
Parameters
Variable | Type | Notes |
---|---|---|
service_id | int | Service ID |
Response
No response supported
Example Code
<?php
add_hook('PreServiceEdit', 1, function($vars)
{
//Your Code here
});
ViewOrderDetailsPage
Executes as the order details page is being displayed
Parameters
Variable | Type | Notes |
---|---|---|
user_id | int | Client ID |
orderid | int | Order ID |
order_no | int | Order Number |
invoice_id | int | Invoice ID |
order_info | Array | Complete Order Information |
Response
No response supported
Example Code
<?php
add_hook('ViewOrderDetailsPage', 1, function($vars)
{
//Your Code here
});
ToDoAddEdit
Executes as the todo Creation/Modification
Parameters
Variable | Type | Notes |
---|---|---|
title | string | Todo Title |
priority | string | Todo Priority |
status | string | Todo Status |
date | string | Todo Date (Creation/Modification) |
note | string | Todo Note (Text of Todo) |
my_notes | string | Yes/No For only Created User |
myday | string | Yes/No For only Created User |
important | string | Yes/No For Marking Todo as Important |
email_notification | string | Yes/No For Sending Email as hook execution |
assigneto | int | Client ID |
Response
No response supported
Example Code
<?php
add_hook('ToDoAddEdit', 1, function($vars)
{
//Your Code here
});