PHP code optimization
-
Here is my crappy code that used to work and now doesn’t under 2.8. I understand that this is not optimized. I pieced together bits and pieces from the web. Although I am getting more familiar with php, I still have a lot to learn. Any help would be appreciated.
<div class=”widgetarea”>
<ul id=”sidebarwidgeted”>
<?php if (!(current_user_can(‘level_0’))){ ?>
<h3>User Dashboard:</h3>
<p><?php wp_loginout(); ?> | <?php wp_register(”, ”);?> | ” title=”Lost Password”>Lost Password</p>
<?php } else { ?>
<h3><?php echo $current_user->user_login; ?>’s Dashboard:</h3>
<ul class=”admin_box”>
<?php if (is_user_logged_in()){
global $user_email, $user_login;
get_currentuserinfo();
echo ”- ” . get_avatar( $user_email, 60) . “
- Logged in as ” . $user_login . “.
- user_login; ?>/”><?php echo $current_user->user_login; ?> Profile
- <?php wp_loginout(); ?>
“;
echo ”“;
} else {
} ?><?php }?>
</div>
The topic ‘PHP code optimization’ is closed to new replies.