-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsitejetDeactivate.php
49 lines (44 loc) · 1.52 KB
/
sitejetDeactivate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
use WHMCS\View\Menu\Item as MenuItem;
// Hide in Client Area Sidebar
add_hook('ClientAreaPage', 1, function($vars) {
$primarySidebar = Menu::primarySidebar();
if ($primarySidebar) {
$serviceActions = $primarySidebar->getChild('Service Details Actions');
if ($serviceActions) {
$serviceActions->removeChild('sitejet');
}
}
});
// Hide from Client area
add_hook('ClientAreaFooterOutput', 1, function($vars) {
return <<<STYLE
<style>
#sitejetPromoPanel{ display: none !important; }
button[data-identifier="sitejet"],
li[data-identifier="sitejet"]{ display:none !important; }
button[data-identifier="sitejet"] + .btn-group > .btn[data-toggle="dropdown"]{
border-top-left-radius: 3.2px;
border-bottom-left-radius: 3.2px;
}
button[data-identifier=“sitejet”] + .btn-group > .btn[data-toggle=“dropdown”],
.btn-group:has(> button[data-identifier=“sitejet”]) > .btn[data-toggle=“dropdown”] {
display: none !important;
}
</style>
STYLE;
});
// Hide from Admin area
add_hook('AdminAreaFooterOutput', 10000, function($vars) {
return <<<SCRIPT
<script>
jQuery(document).ready(function($){
$('.context-btn-container .btn-group button').each( function(){
if ( typeof $(this).attr('onclick') !== 'undefined' && $(this).attr('onclick').includes("SitejetSingleSignOn") ){
$(this).hide();
}
});
});
</script>
SCRIPT;
});