Advertisement
Guest User

Untitled

a guest
Feb 16th, 2017
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.68 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying single questions
  4.  *
  5.  * @package DW Question & Answer
  6.  * @since DW Question & Answer 1.0.1
  7.  */
  8. ?>
  9.  
  10. <?php do_action( 'dwqa_before_single_question_content' ); ?>
  11. <div class="dwqa-question-item">
  12.     <div class="dwqa-question-vote" data-nonce="<?php echo wp_create_nonce( '_dwqa_question_vote_nonce' ) ?>" data-post="<?php the_ID(); ?>">
  13.         <span class="dwqa-vote-count"><?php echo dwqa_vote_count() ?></span>
  14.         <a class="dwqa-vote dwqa-vote-up" href="#"><?php _e( 'Vote Up', 'dwqa' ); ?></a>
  15.         <a class="dwqa-vote dwqa-vote-down" href="#"><?php _e( 'Vote Down', 'dwqa' ); ?></a>
  16.     </div>
  17.     <div class="dwqa-question-meta">
  18.         <?php $user_id = get_post_field( 'post_author', get_the_ID() ) ? get_post_field( 'post_author', get_the_ID() ) : false ?>
  19.         <?php printf( __( '<span><a href="%1$s">%2$s%3$s</a> %4$s asked %5$s ago</span>', 'dwqa' ), dwqa_get_author_link( $user_id ), get_avatar( $user_id, 48 ), get_the_author(),  dwqa_print_user_badge( $user_id ), human_time_diff( get_post_time( 'U', true ) ) ) ?>
  20.         <?php
  21.         $job = get_post_meta( get_the_ID(), '_dwqa_question_job', true );
  22.         echo 'Job: '. $job;
  23.         ?>
  24.         <?php
  25.         $address = get_post_meta( get_the_ID(), '_dwqa_question_address', true );
  26.         echo 'address: '. $address;
  27.         ?>
  28.         <span class="dwqa-question-actions"><?php dwqa_question_button_action() ?></span>
  29.     </div>
  30.     <div class="dwqa-question-content"><?php the_content(); ?></div>
  31.     <footer class="dwqa-question-footer">
  32.         <div class="dwqa-question-meta">
  33.             <?php echo get_the_term_list( get_the_ID(), 'dwqa-question_tag', '<span class="dwqa-question-tag">' . __( 'Question Tags: ', 'dwqa' ), ', ', '</span>' ); ?>
  34.             <?php if ( dwqa_current_user_can( 'edit_question', get_the_ID() ) || dwqa_current_user_can( 'manage_question' ) ) : ?>
  35.                 <?php if ( dwqa_is_enable_status() ) : ?>
  36.                 <span class="dwqa-question-status">
  37.                     <?php _e( 'This question is:', 'dwqa' ) ?>
  38.                     <select id="dwqa-question-status" data-nonce="<?php echo wp_create_nonce( '_dwqa_update_privacy_nonce' ) ?>" data-post="<?php the_ID(); ?>">
  39.                         <optgroup label="<?php _e( 'Status', 'dwqa' ); ?>">
  40.                             <option <?php selected( dwqa_question_status(), 'open' ) ?> value="open"><?php _e( 'Open', 'dwqa' ) ?></option>
  41.                             <option <?php selected( dwqa_question_status(), 'closed' ) ?> value="closed"><?php _e( 'Closed', 'dwqa' ) ?></option>
  42.                             <option <?php selected( dwqa_question_status(), 'resolved' ) ?> value="resolved"><?php _e( 'Resolved', 'dwqa' ) ?></option>
  43.                         </optgroup>
  44.                     </select>
  45.                     </span>
  46.                 <?php endif; ?>
  47.             <?php endif; ?>
  48.         </div>
  49.     </footer>
  50.     <?php comments_template(); ?>
  51. </div>
  52. <?php do_action( 'dwqa_after_single_question_content' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement