Пример #1
0
<?php

/**
 * Answer list item template
 *
 * @link http://anspress.io
 * @since 0.1
 * @license GPL 2+
 * @package AnsPress
 */
if (!ap_user_can_view_post(get_the_ID())) {
    return;
}
global $post;
$clearfix_class = array('ap-questions-item clearfix');
?>

<div id="answer-<?php 
the_ID();
?>
" <?php 
post_class($clearfix_class);
?>
>
	<?php 
if (is_private_post()) {
    ?>

		<div class="private-question-label clearfix">
			<span><?php 
    _e('Private Answer', 'ap');
Пример #2
0
/**
 * Check if user can view current answer
 * @return boolean
 * @since 2.1
 */
function ap_answer_user_can_view()
{
    return ap_user_can_view_post(ap_answer_get_the_answer_id());
}