function user_is_admin() { return user_authed_role() == 'administrator'; }
<div class="meta"> <time datetime="<?php echo date(DATE_W3C, article_time()); ?> "><?php echo date('M j, Y - g:i a', article_time()); ?> </time> </div> </header> <?php echo article_markdown(); ?> <?php if (user_authed() && user_authed_role() == 'administrator') { echo "<a href='/admin/posts/edit/" . article_id() . "' target='_blank'>Edit Article</a>"; } ?> </article> <?php if (has_comments()) { ?> <section id="comments"> <h2><?php echo total_comments(article_id()); ?> comments</h2> <ul class="commentlist"> <?php