Advertisement
Viruthagiri

Untitled

Jul 26th, 2011
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.77 KB | None | 0 0
  1.       <!-- language: lang-php -->
  2.         <?php
  3.         <form id="question-form" method="post" enctype="multipart/form-data" action="<?php echo qa_get_url( 'archive' ); ?>">
  4.         <?php wp_nonce_field( 'qa_edit' ); ?>
  5.    
  6.         <input type="hidden" name="qa_action" value="edit_question" />
  7.         <input type="hidden" name="question_id" value="<?php echo esc_attr( $question->ID ); ?>" />
  8.    
  9.         <table>
  10.             <tr>
  11.                 <td id="question-title-label">
  12.                     <label for="question-title"><?php _e('Title:', QA_TEXTDOMAIN); ?></label>
  13.                 </td>
  14.                 <td id="question-title-td">
  15.                     <input type="text" id="question-title" name="question_title" value="<?php echo esc_attr( $question->post_title ); ?>" />
  16.                 </td>
  17.             </tr>
  18.         </table>
  19.    
  20.         <textarea name="question_content"><?php echo esc_textarea( $question->post_content ); ?></textarea>
  21.    
  22.    
  23.     <!-- My custom fields ends here -->
  24.         <table id="question-taxonomies">
  25.             <tr>
  26.                 <td id="question-category-td">
  27.                 <?php wp_dropdown_categories( array(
  28.                     'taxonomy' => 'question_category',
  29.                     'selected' => $question->cat,
  30.                     'hide_empty' => false,
  31.                     'hierarchical' => true,
  32.                     'name' => 'question_cat',
  33.                     'class' => '',
  34.                     'show_option_none' => __( 'Select category...', QA_TEXTDOMAIN )
  35.                 ) ); ?>
  36.                 </td>
  37.                 <td id="question-tags-label">
  38.                     <label for="question-tags"><?php _e('Tags:', QA_TEXTDOMAIN); ?></label>
  39.                 </td>
  40.                 <td id="question-tags-td">
  41.                     <input type="text" id="question-tags" name="question_tags" value="<?php echo implode( ', ', $question->tags ); ?>" />
  42.                 </td>
  43.             </tr>
  44.         </table>
  45.    
  46.         <?php the_qa_submit_button(); ?>
  47.     </form>
  48.     <?php
  49.     }
  50.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement