Exemplo n.º 1
0
function apoc_private_message_reply()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    // Check the nonce and register the new message
    check_ajax_referer('messages_send_message');
    $result = messages_new_message(array('thread_id' => (int) $_REQUEST['thread_id'], 'content' => $_REQUEST['content']));
    // If the new message was registered successfully
    if ($result) {
        $user = new Apoc_User(get_current_user_id(), 'reply');
        ?>
	<li class="reply new-message">

		<header class="reply-header">
			<time class="reply-time">Right Now</time>
		</header>	

		<section class="reply-body">	
			<div class="reply-author">
				<?php 
        echo $user->block;
        ?>
			</div>
			<div class="reply-content">
				<?php 
        echo wpautop(stripslashes($_REQUEST['content']));
        ?>
			</div>
			<?php 
        $user->signature();
        ?>
		</section>				
	</li>
	
	<?php 
        // Otherwise, process errors
    } else {
        echo '<p class="error">There was a problem sending that reply. Please try again.</p>';
    }
    exit;
}
Exemplo n.º 2
0
?>
			<a class="reply-permalink" href="<?php 
bbp_reply_url();
?>
">#<?php 
echo bbp_get_reply_position();
?>
</a>
		</div>
	</header>
	
	<section class="reply-body">
		<div class="reply-author">
			<?php 
echo $author->block;
?>
		</div>
		
		<div class="reply-content">
			<?php 
bbp_reply_content();
?>
		
		</div>
		<?php 
$author->signature();
?>
	
	</section>
	
</li>
Exemplo n.º 3
0
echo $count;
?>
</a>
		</div>
	</header>
	
	<section class="reply-body">
		<div class="reply-author">
			<?php 
echo $user->block;
?>
		</div>
		
		<div class="reply-content">
			<?php 
if ('0' == $comment->comment_approved) {
    ?>
				<p class="warning comment-moderation">Your comment is awaiting moderation.</p>
			<?php 
}
?>
			<?php 
comment_text($comment->comment_ID);
?>
		</div>
		
		<?php 
$user->signature();
?>
	</section>
</li>