Logging out with one click
-
Hi. I’m trying to customize my admin dashboard to be a one click logout. I’ve tried writing a plugin/function to allow it, but it still won’t do it, so I just got to the point of hacking the wordpress core files. Here’s the function, but it still wants me to click on it twice:
function seelogout() {
echo “
<style type=’text/css’>
div#user_info p.hide-if-js {
display: inline;
}
div#user_info div.hide-if-no-js {
display: none;
}
</style>
“;
}After that failed, I decided to try to hack the core and this worked quite successfully. In the admin-header.php, I commented out the offending core and stuck in what I wanted and it works now:
<div id=”wphead-info”>
<?php /* What I added to the core. */ ?>
<div id=”user-logout1″>
<p style=”float:right;”><?php echo “$howdy $links_no_js”; ?></p>
</div>
<?php /* End of what I added to the core, beginning of commenting out. */ ?>
<?php /* was:
<div id=”user_info”>
<p class=”hide-if-js”><?php echo “$howdy | $links_no_js”; ?></p><div class=”hide-if-no-js”>
<p><?php echo $howdy; ?></p>
<div id=”user_info_arrow”></div>
<div id=”user_info_links_wrap”><div id=”user_info_links”>- <?php echo $links_js; ?>
</div></div>
</div>
</div>
*/ ?>
</div>But is there a way for a function to read the html, and then and then reassign it to spit something else out, like I want, or is there someone who might know how to fix the function I wrote so that it will make it be a one click logout.
Thank you so much!
The topic ‘Logging out with one click’ is closed to new replies.