<?php if (ap_opt('answer_help_page') != '') { ?> <li><a href="#ap-form-help"><?php _e('How to answer', 'ap'); ?> </a></li> <?php } ?> </ul> </div> <div class="ap-tab-container"> <div id="ap-form-main" class="active ap-tab-item"> <?php ap_answer_form(get_question_id()); ?> </div> <div id="ap-form-help" class="ap-tab-item"> <?php if (ap_opt('answer_help_page') != '') { ?> <?php ap_how_to_answer(); ?> <?php } ?> </div> </div>
/** * Generate edit question form, this is a wrapper of ap_answer_form() * @return void * @since 2.0.1 */ function ap_edit_answer_form($question_id) { ap_answer_form($question_id, true); }
<?php $question_id = get_question_id(); $current_user = get_userdata(get_current_user_id()); $validate = ap_validate_form(); if (!empty($validate['has_error'])) { echo '<div class="alert alert-danger" data-dismiss="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>' . __('Problem submitting form, please recheck form', 'ap') . '</div>'; } ?> <div id="answer-form-c"> <div class="ap-avatar"> <?php echo get_avatar($current_user->user_email, ap_opt('avatar_size_qquestion')); ?> </div> <?php ap_answer_form($question_id); ?> </div>