echo $answer->get_answer_value(); ?> </p> <a href="<?php echo $provider->get_edit_answer_url($answer); ?> ">change this answer</a> </li> <?php } ?> <li class="cftp-dt-current"> <?php $answer = new CFTP_DT_Answer(get_the_ID()); $provider = $this->get_answer_provider($answer->get_answer_type()); ?> <h2 class="cftp-dt-current"><?php echo $title; ?> </h2> <div class="cftp-dt-content"><?php echo $content; ?> </div> <?php if ($answer_links) {
<?php defined('ABSPATH') or die; ?> <ul id="cftp-dt-next"> <?php $answer = new CFTP_DT_Answer(get_the_ID()); $provider = $this->get_answer_provider($answer->get_answer_type()); ?> <?php foreach ($answers as $answer_id => $answer) { ?> <?php if (!($provider = $this->get_answer_provider($answer->get_answer_type()))) { # @TODO this should probably raise a warning or something continue; } ?> <li class="cftp-dt-next-answer"> <?php echo $provider->get_answer($answer); ?> </li> <?php } ?>
<?php } ?> <ol id="cftp-dt-answers"> <li class="cftp_dt_prev_answer"><a href="<?php echo get_permalink($start->ID); ?> "><h3 class="cftp-dt-node-title">Home</h3></a> ❱</li> <?php foreach ($previous_answers as $previous_answer) { $previous_answer = get_post($previous_answer); if (!$previous_answer->post_parent) { continue; } $previous_answer_parent = get_post($previous_answer->post_parent); $answer = new CFTP_DT_Answer($previous_answer->ID); $provider = $this->get_answer_provider($answer->get_answer_type()); ?> <li class="cftp_dt_prev_answer"> <a href="<?php echo $provider->get_edit_answer_url($answer); ?> "><h3 class="cftp-dt-node-title"><?php echo $previous_answer_parent->post_title; ?> </h3></a> ❱ </li> <?php } ?>
/** * @TODO * * @access public * * @return string **/ public function get_edit_answer_url(CFTP_DT_Answer $answer) { return get_permalink($answer->get_post()->post_parent); }