WordPress.org

Ready to get started?Download WordPress

Forums

Admin-Link-Box
Possible link improvement (1 post)

  1. aguseo
    Member
    Posted 2 years ago #

    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 http://127.0.0.1/samplesite.

    In this case the admin link would show to http://127.0.0.1/wp-admin 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>';
    }

    http://wordpress.org/extend/plugins/admin-link-box/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by aguseo
  • This topic is not a support question
  • WordPress version: 3.3.1