/bbpress/form-reply.php

  1. <?php 
  2. /** 
  3. * New/Edit Reply 
  4. * 
  5. * @package bbPress 
  6. * @subpackage Theme 
  7. */ 
  8. if (bbp_is_reply_edit()) : 
  9. ?> 
  10.  
  11. <div id="bbpress-forums"> 
  12.  
  13. <?php 
  14. $evolve_breadcrumbs = evolve_get_option('evl_breadcrumbs', '1'); 
  15. if ($evolve_breadcrumbs == "1"): 
  16. bbp_breadcrumb(); 
  17. endif; 
  18.  
  19. endif; 
  20.  
  21. if (bbp_current_user_can_access_create_reply_form()) : 
  22. ?> 
  23.  
  24. <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form"> 
  25.  
  26. <form id="new-post" name="new-post" method="post" action="<?php the_permalink(); ?>"> 
  27.  
  28. <?php do_action('bbp_theme_before_reply_form'); ?> 
  29.  
  30. <fieldset class="bbp-form"> 
  31. <legend><?php printf(__('Reply To: %s', 'evolve'), bbp_get_topic_title()); ?></legend> 
  32.  
  33. <?php do_action('bbp_theme_before_reply_form_notices'); ?> 
  34.  
  35. <div> 
  36.  
  37. <?php 
  38. bbp_get_template_part('form', 'anonymous'); 
  39.  
  40. do_action('bbp_theme_before_reply_form_content'); 
  41.  
  42. bbp_the_content(array('context' => 'reply')); 
  43.  
  44. do_action('bbp_theme_after_reply_form_content'); 
  45.  
  46. if (!( bbp_use_wp_editor() || current_user_can('unfiltered_html') )) : 
  47. ?> 
  48.  
  49. <p class="form-allowed-tags"> 
  50. <label><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'evolve'); ?></label><br /> 
  51. <code><?php bbp_allowed_tags(); ?></code> 
  52. </p> 
  53.  
  54. <?php 
  55. endif; 
  56.  
  57. if (bbp_allow_topic_tags() && current_user_can('assign_topic_tags')) : 
  58.  
  59. do_action('bbp_theme_before_reply_form_tags'); 
  60. ?> 
  61.  
  62. <p> 
  63. <label for="bbp_topic_tags"><?php _e('Tags:', 'evolve'); ?></label><br /> 
  64. <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled(bbp_is_topic_spam()); ?> /> 
  65. </p> 
  66.  
  67. <?php 
  68. do_action('bbp_theme_after_reply_form_tags'); 
  69.  
  70. endif; 
  71.  
  72. if (bbp_allow_revisions() && bbp_is_reply_edit()) : 
  73.  
  74. do_action('bbp_theme_before_reply_form_revisions'); 
  75. ?> 
  76.  
  77. <fieldset class="bbp-form"> 
  78. <legend> 
  79. <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 
  80. <label for="bbp_log_reply_edit"><?php _e('Keep a log of this edit:', 'evolve'); ?></label><br /> 
  81. </legend> 
  82.  
  83. <div> 
  84. <label for="bbp_reply_edit_reason"><?php printf(__('Optional reason for editing:', 'evolve'), bbp_get_current_user_name()); ?></label><br /> 
  85. <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" /> 
  86. </div> 
  87. </fieldset> 
  88.  
  89. <?php 
  90. do_action('bbp_theme_after_reply_form_revisions'); 
  91.  
  92. endif; 
  93.  
  94. do_action('bbp_theme_before_reply_form_submit_wrapper'); 
  95. ?> 
  96.  
  97. <div class="bbp-submit-wrapper"> 
  98.  
  99. <?php 
  100. do_action('bbp_theme_before_reply_form_submit_button'); 
  101.  
  102. bbp_cancel_reply_to_link(); 
  103. ?> 
  104.  
  105. <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit small default"><?php _e('Submit', 'evolve'); ?></button> 
  106.  
  107. <?php do_action('bbp_theme_after_reply_form_submit_button'); ?> 
  108.  
  109. </div> 
  110.  
  111. <?php 
  112. if (bbp_is_subscriptions_active() && !bbp_is_anonymous() && (!bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) )) : 
  113.  
  114. do_action('bbp_theme_before_reply_form_subscription'); 
  115. ?> 
  116.  
  117. <div class="notify"> 
  118.  
  119. <p> 
  120.  
  121. <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 
  122.  
  123. <?php if (bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() )) : ?> 
  124.  
  125. <label for="bbp_topic_subscription"><?php _e('Notify the author of follow-up replies via email', 'evolve'); ?></label> 
  126.  
  127. <?php else : ?> 
  128.  
  129. <label for="bbp_topic_subscription"><?php _e('Notify me of follow-up replies via email', 'evolve'); ?></label> 
  130.  
  131. <?php endif; ?> 
  132.  
  133. </p> 
  134.  
  135. </div> 
  136.  
  137. <?php 
  138. do_action('bbp_theme_after_reply_form_subscription'); 
  139.  
  140. endif; 
  141.  
  142. do_action('bbp_theme_after_reply_form_submit_wrapper'); 
  143. ?> 
  144.  
  145. </div> 
  146.  
  147. <?php bbp_reply_form_fields(); ?> 
  148.  
  149. </fieldset> 
  150.  
  151. <?php do_action('bbp_theme_after_reply_form'); ?> 
  152.  
  153. </form> 
  154. </div> 
  155.  
  156. <?php elseif (bbp_is_topic_closed()) : ?> 
  157.  
  158. <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 
  159. <div class="bbp-template-notice"> 
  160. <p><?php printf(__('The topic ‘%s’ is closed to new replies.', 'evolve'), bbp_get_topic_title()); ?></p> 
  161. </div> 
  162. </div> 
  163.  
  164. <?php elseif (bbp_is_forum_closed(bbp_get_topic_forum_id())) : ?> 
  165.  
  166. <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 
  167. <div class="bbp-template-notice"> 
  168. <p><?php printf(__('The forum ‘%s’ is closed to new topics and replies.', 'evolve'), bbp_get_forum_title(bbp_get_topic_forum_id())); ?></p> 
  169. </div> 
  170. </div> 
  171.  
  172. <?php else : ?> 
  173.  
  174. <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 
  175. <div class="bbp-template-notice"> 
  176. <p><?php is_user_logged_in() ? _e('You cannot reply to this topic.', 'evolve') : _e('You must be logged in to reply to this topic.', 'evolve'); ?></p> 
  177. </div> 
  178. </div> 
  179.  
  180. <?php 
  181. endif; 
  182.  
  183. if (bbp_is_reply_edit()) : 
  184. ?> 
  185.  
  186. </div> 
  187.  
  188. <?php 
  189. endif; 
.