forked from anspress/anspress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
question.php
99 lines (92 loc) · 3.02 KB
/
question.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* This file is responsible for displaying question page
* This file can be overridden by creating a anspress directory in active theme folder.
*
* @package AnsPress
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @author Rahul Aryan <support@anspress.io>
*/
?>
<div id="ap-single" class="ap-q clearfix" itemtype="http://schema.org/Question" itemscope="">
<?php
/**
* By default this title is hidden
*/
if(ap_opt('show_title_in_question')) :
?>
<h1 class="entry-title"><a href="<?php get_permalink() ?>"><?php the_title(); ?></a></h1>
<?php endif; ?>
<div class="ap-question-lr row">
<div class="ap-q-left <?php echo (is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')) ? 'col-md-8' : 'col-md-12'; ?>">
<div class="ap-question-meta clearfix">
<?php echo ap_display_question_metas() ?>
</div>
<div id="question" role="main" class="ap-content question" data-id="<?php ap_question_the_ID(); ?>">
<div class="ap-single-vote"><?php ap_question_the_vote_button(); ?></div>
<?php
/**
* ACTION: ap_before_question_title
* @since 2.0
*/
do_action('ap_before_question_content');
?>
<div class="ap-avatar">
<a href="<?php ap_question_the_author_link(); ?>"<?php ap_hover_card_attributes(ap_question_get_author_id()); ?>>
<?php ap_question_the_author_avatar( ap_opt('avatar_size_qquestion') ); ?>
</a>
</div>
<div class="ap-q-cells clearfix">
<div class="ap-q-metas">
<?php ap_user_display_meta(true, false, true); ?>
<span><?php ap_question_the_time(); ?></span>
</div>
<!-- Start ap-content-inner -->
<div class="ap-q-inner">
<div class="question-content ap-q-content" itemprop="text">
<?php the_content(); ?>
</div>
<?php
/**
* ACTION: ap_after_question_content
* @since 2.0.0-alpha2
*/
do_action('ap_after_question_content');
?>
<?php ap_question_the_active_time(); ?>
<?php ap_post_status_description(ap_question_get_the_ID()); ?>
<?php ap_post_actions_buttons() ?>
<?php
/**
* ACTION: ap_after_question_actions
* @since 2.0
*/
do_action('ap_after_question_actions');
?>
</div>
<!-- End ap-content-inner -->
<?php ap_question_the_comments(); ?>
</div>
</div>
<?php
/**
* Output list of answers
*/
ap_question_the_answers();
?>
<?php ap_question_the_answer_form(); ?>
</div>
<?php if ( is_active_sidebar( 'ap-qsidebar' ) || ap_opt('show_question_sidebar')){ ?>
<div class="ap-question-right col-md-4">
<?php if(ap_opt('show_question_sidebar')): ?>
<?php the_widget( 'AnsPress_Subscribe_Widget' ); ?>
<h3 class="ap-widget-title"><?php _e('Question stats', 'ap'); ?></h3>
<?php the_widget('AnsPress_Stats_Widget'); ?>
<?php endif; ?>
<div class="ap-question-info">
<?php dynamic_sidebar( 'ap-qsidebar' ); ?>
</div>
</div>
<?php } ?>
</div>
</div>