Beispiel #1
0
function user_is_admin()
{
    return user_authed_role() == 'administrator';
}
Beispiel #2
0
				<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