• Hello,
    I thought I might sahe this little hack.
    I was looking to put a Logout link on the dashboard.
    The problem was that your code was forcing : /wp-admin/

    So I ended up taking it out:
    $admin_url = site_url(); //$admin_url = site_url()."/wp-admin/";
    …and adding it back into the Dashboard Widget Links : /wp-admin/profile.php

    This then means I can also use : /wp-login.php?action=logout

    I hope you don’t mind… maybe a little tick box or a test could be integrated in a future release.

    By the way I love this plugin.

Viewing 1 replies (of 1 total)
  • Thread Starter markingston

    (@markingston)

    Haha,
    replying to my own post here… I didn’t read your code far enough. I see you already have a switch:

    if(strpos($item['link'] , 'http') ===false){ //not full link
    					$link = ($item['link'] != 'site_url')? $admin_url.$item['link'] : home_url();
    				}else{
    					$link = $item['link'];
    				}

    So sorry for my previous hack. I guess if I just put in a full URL your code will handle my need without the need for a tick box or a test!

    Sorry for any confusion. All the best.

Viewing 1 replies (of 1 total)
  • The topic ‘A little hack …’ is closed to new replies.