Ok, I’ve got some problems using chuckg’s solution.
I put this function into my-hacks.php, activated it in wordpress’s backend and put file into blog root directory.
function is_admin () {
global $user_level;
get_currentuserinfo();
if ($user_level == 10) { return true; }
else { return false; }
}
I try to summon it in sidebar.php:
<?php if (is_admin()) { echo '<ul><li>'; wp_loginout(); echo '</li><li><a href="/blog/wp-admin/">Admin Panel</a></li><li><a href="/blog/wp-admin/post.php">Add post</a></li><li><a href="https://stat.4u.pl/?******">Stats</a></li></ul>'; } ?>
And at the top of my blog whole function appears, shifting rest of content.
Can you probably help me with other, easier solution? Sth similar to smarty-like <ADMIN_BLOCK></ADMIN_BLOCK>
. Or help to debug that function / way of using it.