Viewing File: /usr/local/cpanel/3rdparty/wp-toolkit/whm-plugin/WpToolkitWidget.pm

package Cpanel::Plugins::Components::whostmgr::home::WpToolkitWidget;
# Copyright 1999-2026. WebPros International GmbH. All rights reserved.

use Moo;
use cPstrict;

extends 'Cpanel::Plugins::Components::Base';

has '+slot' => (
    default => 'page-top',
);

has '+markup' => (
    default => sub {
        return <<"END_TEMPLATE";
        <link rel="stylesheet" type="text/css" href="/cgi/wp-toolkit/main.css" />
        <script src="/cgi/wp-toolkit/app.bundle.js"></script>
        <script>
            if (typeof wptCpanelMain !== 'undefined' && wptCpanelMain.whmHomeBlocks) {
                wptCpanelMain.whmHomeBlocks({
                    restApiUrl: '/cgi/wpt/index.php'
                });
            }
        </script>
END_TEMPLATE
    }
);

around 'is_enabled' => sub ( $orig, $self, @args ) {
    return 1;
};

1;

Back to Directory File Manager