Can anyone direct me how to modify this code to add the customers domain name into a link?
For example, ALL my customers have some sort of hosting plan. NOT all have domains with me. Additionally, ALL have a Wordpress website with me that we help maintain for them.
I want to add a link into this shortcut area that will take them directly to their wp-admin page, so https://theirdomainname.com/wp-admin
I found this Social Media code and it works perfectly for what I want, I just need it to only show up if they are logged in AND a way to get their domain name from whmcs. Is there a {$domain-name} variable or some such? How would I format that to achieve {$domain-name}/wp-admin ??
THANK YOU very much for any help or direction you can provide.
Here is the code I found on whmcs to add the links in the shortcuts area:
<?php
use WHMCS\View\Menu\Item as MenuItem;
// Add social media links to the end of all secondary sidebars.
add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar)
{
// Add a panel to the end of the secondary sidebar for social media links.
// Declare it with the name "social-media" so we can easily retrieve it
// later.
$secondarySidebar->addChild('social-media', array(
'label' => 'Social Media',
'uri' => '#',
'icon' => 'fa-thumbs-up',
));
// Retrieve the panel we just created.
$socialMediaPanel = $secondarySidebar->getChild('social-media');
// Move the panel to the end of the sorting order so it's always displayed
// as the last panel in the sidebar.
$socialMediaPanel->moveToBack();
// Add a Facebook link to the panel.
$socialMediaPanel->addChild('facebook-link', array(
'uri' => 'https://facebook.com/our-great-company',
'label' => 'Like us on Facebook!',
'order' => 1,
'icon' => 'fa-facebook',
));
// Add a Twitter link to the panel after the Facebook link.
$socialMediaPanel->addChild('twitter-link', array(
'uri' => 'https://twitter.com/ourgreatcompany',
'label' => 'Follow us on Twitter!',
'order' => 2,
'icon' => 'fa-twitter',
));
// Add a Google+ link to the panel after the Twitter link.
$socialMediaPanel->addChild('google-plus-link', array(
'uri' => 'https://plus.google.com/1234567890123456',
'label' => 'Add us to your circles!',
'order' => 3,
'icon' => 'fa-google-plus',
));
});