I have been using HESK for years. It has no wordpress plugin which sucks but no support program made for wordpress has its great features.
I need to use HESK as a bug reporting/tracking system. I have had to devise a way to pass information to HESK from wordpress using this link:
<a href="https://archtronics.com/support/index.php?a=add&custom1=
<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>
&category=10&name=<?php $current_user = wp_get_current_user();
echo $current_user->user_firstname . ' ';
echo $current_user->user_lastname . '&email=';
echo $current_user->user_email . '&custom2=';
echo $current_user->user_login;?>
&subject=I%20found%20a%20bug!%20Squash%20it%20please." target="_blank">Report a Bug</a>
That works just fine, but here is the problem.
I really need the link to be available on every page of each site for logged in users. I figure the best way to do this is to have it appear on the admin bar.
I am trying to make a simple plugin that will allow me to make this addition to the admin bar and all I have found on the internet are ways to add a static link up there. Example below:
add_action( 'admin_bar_menu', 'toolbar_link_to_mypage', 999 );
function toolbar_link_to_mypage( $wp_admin_bar ) {
$args = array(
'id' => 'my_page',
'title' => 'My Page',
'href' => 'http://mysite.com/my-page/',
'meta' => array( 'class' => 'my-toolbar-page' )
);
$wp_admin_bar->add_node( $args );
}
I am not very good in PHP yet and I have tried so many different ways to get my link to work on the admin bar with no success.
Does anyone know how to get a dynamic link like mine onto the admin bar?