[ Index ] |
PHP Cross Reference of BBPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * New/Edit Reply 5 * 6 * @package bbPress 7 * @subpackage Theme 8 */ 9 10 // Exit if accessed directly 11 defined( 'ABSPATH' ) || exit; 12 13 if ( bbp_is_reply_edit() ) : ?> 14 15 <div id="bbpress-forums" class="bbpress-wrapper"> 16 17 <?php bbp_breadcrumb(); ?> 18 19 <?php endif; ?> 20 21 <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?> 22 23 <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form"> 24 25 <form id="new-post" name="new-post" method="post"> 26 27 <?php do_action( 'bbp_theme_before_reply_form' ); ?> 28 29 <fieldset class="bbp-form"> 30 <legend><?php printf( esc_html__( 'Reply To: %s', 'bbpress' ), ( bbp_get_form_reply_to() ) ? sprintf( esc_html__( 'Reply #%1$s in %2$s', 'bbpress' ), bbp_get_form_reply_to(), bbp_get_topic_title() ) : bbp_get_topic_title() ); ?></legend> 31 32 <?php do_action( 'bbp_theme_before_reply_form_notices' ); ?> 33 34 <?php if ( ! bbp_is_topic_open() && ! bbp_is_reply_edit() ) : ?> 35 36 <div class="bbp-template-notice"> 37 <ul> 38 <li><?php esc_html_e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to reply.', 'bbpress' ); ?></li> 39 </ul> 40 </div> 41 42 <?php endif; ?> 43 44 <?php if ( ! bbp_is_reply_edit() && bbp_is_forum_closed() ) : ?> 45 46 <div class="bbp-template-notice"> 47 <ul> 48 <li><?php esc_html_e( 'This forum is closed to new content, however your posting capabilities still allow you to post.', 'bbpress' ); ?></li> 49 </ul> 50 </div> 51 52 <?php endif; ?> 53 54 <?php if ( current_user_can( 'unfiltered_html' ) ) : ?> 55 56 <div class="bbp-template-notice"> 57 <ul> 58 <li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li> 59 </ul> 60 </div> 61 62 <?php endif; ?> 63 64 <?php do_action( 'bbp_template_notices' ); ?> 65 66 <div> 67 68 <?php bbp_get_template_part( 'form', 'anonymous' ); ?> 69 70 <?php do_action( 'bbp_theme_before_reply_form_content' ); ?> 71 72 <?php bbp_the_content( array( 'context' => 'reply' ) ); ?> 73 74 <?php do_action( 'bbp_theme_after_reply_form_content' ); ?> 75 76 <?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?> 77 78 <p class="form-allowed-tags"> 79 <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'bbpress' ); ?></label><br /> 80 <code><?php bbp_allowed_tags(); ?></code> 81 </p> 82 83 <?php endif; ?> 84 85 <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?> 86 87 <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?> 88 89 <p> 90 <label for="bbp_topic_tags"><?php esc_html_e( 'Tags:', 'bbpress' ); ?></label><br /> 91 <input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> /> 92 </p> 93 94 <?php do_action( 'bbp_theme_after_reply_form_tags' ); ?> 95 96 <?php endif; ?> 97 98 <?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_reply_edit() || ( bbp_is_reply_edit() && ! bbp_is_reply_anonymous() ) ) ) : ?> 99 100 <?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?> 101 102 <p> 103 104 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> /> 105 106 <?php if ( bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() ) ) : ?> 107 108 <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label> 109 110 <?php else : ?> 111 112 <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label> 113 114 <?php endif; ?> 115 116 </p> 117 118 <?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?> 119 120 <?php endif; ?> 121 122 <?php if ( bbp_is_reply_edit() ) : ?> 123 124 <?php if ( current_user_can( 'moderate', bbp_get_reply_id() ) ) : ?> 125 126 <?php do_action( 'bbp_theme_before_reply_form_reply_to' ); ?> 127 128 <p class="form-reply-to"> 129 <label for="bbp_reply_to"><?php esc_html_e( 'Reply To:', 'bbpress' ); ?></label><br /> 130 <?php bbp_reply_to_dropdown(); ?> 131 </p> 132 133 <?php do_action( 'bbp_theme_after_reply_form_reply_to' ); ?> 134 135 <?php do_action( 'bbp_theme_before_reply_form_status' ); ?> 136 137 <p> 138 <label for="bbp_reply_status"><?php esc_html_e( 'Reply Status:', 'bbpress' ); ?></label><br /> 139 <?php bbp_form_reply_status_dropdown(); ?> 140 </p> 141 142 <?php do_action( 'bbp_theme_after_reply_form_status' ); ?> 143 144 <?php endif; ?> 145 146 <?php if ( bbp_allow_revisions() ) : ?> 147 148 <?php do_action( 'bbp_theme_before_reply_form_revisions' ); ?> 149 150 <fieldset class="bbp-form"> 151 <legend> 152 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> /> 153 <label for="bbp_log_reply_edit"><?php esc_html_e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br /> 154 </legend> 155 156 <div> 157 <label for="bbp_reply_edit_reason"><?php printf( esc_html__( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br /> 158 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" /> 159 </div> 160 </fieldset> 161 162 <?php do_action( 'bbp_theme_after_reply_form_revisions' ); ?> 163 164 <?php endif; ?> 165 166 <?php endif; ?> 167 168 <?php do_action( 'bbp_theme_before_reply_form_submit_wrapper' ); ?> 169 170 <div class="bbp-submit-wrapper"> 171 172 <?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?> 173 174 <?php bbp_cancel_reply_to_link(); ?> 175 176 <button type="submit" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button> 177 178 <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?> 179 180 </div> 181 182 <?php do_action( 'bbp_theme_after_reply_form_submit_wrapper' ); ?> 183 184 </div> 185 186 <?php bbp_reply_form_fields(); ?> 187 188 </fieldset> 189 190 <?php do_action( 'bbp_theme_after_reply_form' ); ?> 191 192 </form> 193 </div> 194 195 <?php elseif ( bbp_is_topic_closed() ) : ?> 196 197 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 198 <div class="bbp-template-notice"> 199 <ul> 200 <li><?php printf( esc_html__( 'The topic ‘%s’ is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></li> 201 </ul> 202 </div> 203 </div> 204 205 <?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?> 206 207 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 208 <div class="bbp-template-notice"> 209 <ul> 210 <li><?php printf( esc_html__( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li> 211 </ul> 212 </div> 213 </div> 214 215 <?php else : ?> 216 217 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 218 <div class="bbp-template-notice"> 219 <ul> 220 <li><?php is_user_logged_in() 221 ? esc_html_e( 'You cannot reply to this topic.', 'bbpress' ) 222 : esc_html_e( 'You must be logged in to reply to this topic.', 'bbpress' ); 223 ?></li> 224 </ul> 225 </div> 226 227 <?php if ( ! is_user_logged_in() ) : ?> 228 229 <?php bbp_get_template_part( 'form', 'user-login' ); ?> 230 231 <?php endif; ?> 232 233 </div> 234 235 <?php endif; ?> 236 237 <?php if ( bbp_is_reply_edit() ) : ?> 238 239 </div> 240 241 <?php endif;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Jan 15 01:00:51 2025 | Cross-referenced by PHPXref 0.7.1 |