Support » Plugins and Hacks » [Plugin: Admin-Link-Box] Possible link improvement

[Plugin: Admin-Link-Box] Possible link improvement

  • Plugin works absolutely fine and is cool.
    However, when building WordPress pages on my laptop I use an xampp server, and the sites address is usually

    In this case the admin link would show to which is not good.

    Thus I reco to use the site_url function of wordpress to get it proper everywhere.

    Here’s the final code:

    function lynkAdminLinkBox() {
    $url = site_url('/wp-admin', '');
    echo '<div style="position: absolute; top: 0; left: 0; width: 12px; height: 12px; font: 1px; z-index: 76;" onmouseover="document.getElementById(\'lynkAdminBoxOn\').style.visibility=\'visible\';"></div><div style="background: #2e4e73; color: #fff; position: absolute; top: 0; left: 0; width: 12px; height: 80px; z-index: 78; display: block; margin: 0; padding: 0; visibility: hidden; font: 9px Arial; text-align: center; cursor: pointer;" onmouseout="this.style.visibility=\'hidden\';" onclick="window.location.href=\'' . $url . '\'" id="lynkAdminBoxOn">&nbsp;&nbsp; A D M I N</div>';


  • The topic ‘[Plugin: Admin-Link-Box] Possible link improvement’ is closed to new replies.