• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question How can I use pm_Hook_Applications for scan applications?

sfsdg

New Pleskian
Hi, I'm need to scan WordPress applications. How can I use pm_Hook_Applications for scan applications?

I'm created Applilcations.php file on
Code:
 /usr/local/psa/admin/plib/modules/wys-center/hooks
path and here is my code;

Code:
<?php

class Modules_WysCenter_Applications implements pm_Hook_Applications
{
    /**
     * Handle application scan event
     * @param pm_Domain $domain
     */
    public function scan($domain) {
    }
    /**
     * Filter application to handle it by using a specific non-APS resources
     *
     * @param pm_Domain $domain
     * @param string $path
     * @return bool
     */
    public function isFiltered($domain, $path) { }
}
 
Last edited:
Hello @sfsdg,

Extensions API Documentation - Plesk 17.5

This hock is designed to a APS applications integration only. The "scan" method is called when somebody press button "Scan" in Applications tab. Here you've got a \pm_Domain object and you can implement any bussiness logic here according your's extension needs.

Method "isFiltered" is designed to display only the necessary applications according your bussiness logic. For example you don't wanna to show an APS application wich placed at some domain (example.com) with path "/wordpress/test-app/".

So you shouldn't implement this hook unlles you want to integrate your extension with Plesk APS feature
 
Back
Top