Example #1
0
?>
				<?php 
ap_answer_the_time();
?>
			</div>
			<div class="ap-q-inner">
				<div class="ap-answer-content ap-q-content" itemprop="text">
					aid=<?php 
echo get_the_ID();
?>
.<?php 
the_content();
?>
				</div>
				<?php 
ap_answer_the_active_time();
?>
				<?php 
ap_post_status_description(ap_answer_get_the_answer_id());
?>
				<?php 
ap_post_actions_buttons();
?>
			</div>
			<?php 
ap_answer_the_comments();
?>
		</div>
	</div>
</div>
Example #2
0
    /**
     * Render Meta Box content.
     */
    public function answers_meta_box_content()
    {
        global $answers;
        $answers = ap_get_answers(array('question_id' => get_the_ID()));
        if (ap_have_answers()) {
            while (ap_have_answers()) {
                ap_the_answer();
                ?>
            <div id="answer_<?php 
                the_ID();
                ?>
" data-id="<?php 
                the_ID();
                ?>
" class="ap-ansm clearfix">
                <div class="author">
					<a class="ap-ansm-avatar" href="<?php 
                ap_answer_the_author_link();
                ?>
"<?php 
                ap_hover_card_attributes(ap_answer_get_author_id());
                ?>
>
						<?php 
                ap_answer_the_author_avatar();
                ?>
					</a>
					<strong class="ap-ansm-name"><?php 
                echo ap_user_display_name(ap_answer_get_author_id());
                ?>
</strong>
                </div>

                <div class="ap-ansm-inner">
                    
                    <div class="ap-ansm-meta">
						<?php 
                ap_answer_the_active_time();
                ?>
					</div>
					
					<div class="ap-ansm-content"><?php 
                the_content();
                ?>
</div>
					
					<div class="answer-actions">

						<span><a href="<?php 
                echo get_edit_post_link(get_the_ID());
                ?>
"><?php 
                _e('Edit', 'ap');
                ?>
</a></span>
						<span class="delete vim-d vim-destructive"> | <a href="<?php 
                echo get_delete_post_link(get_the_ID());
                ?>
"><?php 
                _e('Trash', 'ap');
                ?>
</a></span>
					</div>

				</div>
			</div>
			<?php 
            }
        } else {
            ?>
            <div class="inside">
				<a href="#addanswerbtn" class="button"><?php 
            _e('Add answer', 'ap');
            ?>
</a>
				<?php 
            _e('No answers yet', 'ap');
            ?>
            </div>
            
			<?php 
        }
        wp_reset_postdata();
    }