Untitled diff

Created Diff never expires
21 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
245 lines
21 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
245 lines
<?php
<?php
/**
/**
* New/Edit Topic
* New/Edit Topic
*
*
* @package bbPress
* @package bbPress
* @subpackage Theme
* @subpackage Theme
*/
*/
?>
?>
<?php if ( !bbp_is_single_forum() ) : ?>
<?php if ( !bbp_is_single_forum() ) : ?>
<div id="bbpress-forums">
<div id="bbpress-forums">
<?php bbp_breadcrumb(); ?>
<?php bbp_breadcrumb(); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( bbp_is_topic_edit() ) : ?>
<?php if ( bbp_is_topic_edit() ) : ?>
<?php bbp_topic_tag_list( bbp_get_topic_id() ); ?>
<?php bbp_topic_tag_list( bbp_get_topic_id() ); ?>
<?php bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) ); ?>
<?php bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>
<?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>
<?php if ( ($_GET['new-post'] == 'true') || ( bbp_is_topic_edit() )) : ?>
<div id="new-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-form">
<div id="new-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-form">
<form id="new-post" name="new-post" method="post" action="<?php the_permalink(); ?>">
<form id="new-post" name="new-post" method="post" action="<?php the_permalink(); ?>">
<?php do_action( 'bbp_theme_before_topic_form' ); ?>
<?php do_action( 'bbp_theme_before_topic_form' ); ?>
<fieldset class="bbp-form">
<fieldset class="bbp-form">
<legend>
<legend>
<?php
<?php
if ( bbp_is_topic_edit() )
if ( bbp_is_topic_edit() )
printf( __( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_topic_title() );
printf( __( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_topic_title() );
else
else
bbp_is_single_forum() ? printf( __( 'Create New Topic in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title($_GET['forum-id']) ) : _e('إنشاء موضوع جديد في قسم "'. bbp_get_forum_title($_GET['forum-id']) .'"','bbpress' );
bbp_is_single_forum() ? printf( __( 'Create New Topic in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Topic', 'bbpress' );
?>
?>
</legend>
</legend>
<?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>
<?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
<?php if ( !bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
<div class="bbp-template-notice">
<div class="bbp-template-notice">
<p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
<p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
<div class="bbp-template-notice">
<div class="bbp-template-notice">
<p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
<p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div>
<div>
<?php bbp_get_template_part( 'form', 'anonymous' ); ?>
<?php bbp_get_template_part( 'form', 'anonymous' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_title' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_title' ); ?>
<p>
<p>
<label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
<label for="bbp_topic_title"><?php printf( __( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
<input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />
<input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />
</p>
</p>
<?php do_action( 'bbp_theme_after_topic_form_title' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_title' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_content' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_content' ); ?>
<?php bbp_the_content( array( 'context' => 'topic' ) ); ?>
<?php bbp_the_content( array( 'context' => 'topic' ) ); ?>
<?php do_action( 'bbp_theme_after_topic_form_content' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_content' ); ?>
<?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
<?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
<p class="form-allowed-tags">
<p class="form-allowed-tags">
<label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
<label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
<code><?php bbp_allowed_tags(); ?></code>
<code><?php bbp_allowed_tags(); ?></code>
</p>
</p>
<?php endif; ?>
<?php endif; ?>
<div class="topic-more-options">
<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>
<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_tags' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_tags' ); ?>
<p>
<p>
<label for="bbp_topic_tags"><?php _e( 'Topic Tags:', 'bbpress' ); ?></label><br />
<label for="bbp_topic_tags"><?php _e( 'Topic Tags:', 'bbpress' ); ?></label><br />
<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() ); ?> />
<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() ); ?> />
</p>
</p>
<?php do_action( 'bbp_theme_after_topic_form_tags' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_tags' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( !bbp_is_single_forum() ) : ?>
<?php if ( !bbp_is_single_forum() ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
<?php if (!bbp_is_topic_edit()): ?>
<p>
<p>
<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
<select name="bbp_forum_id" id="bbp_forum_id" tabindex="104">
<?php
<option class="level-0" value="<?php echo $_GET['forum-id']; ?>"><?php echo bbp_get_forum_title($_GET['forum-id']); ?></option>
bbp_dropdown( array(
</select>
'show_none' => __( '(No Forum)', 'bbpress' ),
'selected' => bbp_get_form_topic_forum()
) );
?>
</p>
</p>
<?php else : ?>
<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
<select name="bbp_forum_id" id="bbp_forum_id" tabindex="104">
<option class="level-0" value="<?php echo bbp_get_topic_forum_id(); ?>"><?php echo bbp_get_topic_forum_title(); ?></option>
</select>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( current_user_can( 'moderate' ) ) : ?>
<?php if ( current_user_can( 'moderate' ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_type' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_type' ); ?>
<p>
<p>
<label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br />
<label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br />
<?php bbp_form_topic_type_dropdown(); ?>
<?php bbp_form_topic_type_dropdown(); ?>
</p>
</p>
<?php do_action( 'bbp_theme_after_topic_form_type' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_type' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_status' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_status' ); ?>
<p>
<p>
<label for="bbp_topic_status"><?php _e( 'Topic Status:', 'bbpress' ); ?></label><br />
<label for="bbp_topic_status"><?php _e( 'Topic Status:', 'bbpress' ); ?></label><br />
<?php bbp_form_topic_status_dropdown(); ?>
<?php bbp_form_topic_status_dropdown(); ?>
</p>
</p>
<?php do_action( 'bbp_theme_after_topic_form_status' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_status' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
<?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
<p>
<p>
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />
<?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?>
<?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?>
<label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
<label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
<?php else : ?>
<?php else : ?>
<label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
<label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
<?php endif; ?>
<?php endif; ?>
</p>
</p>
<?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
<?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_revisions' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_revisions' ); ?>
<fieldset class="bbp-form">
<fieldset class="bbp-form">
<legend>
<legend>
<input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
<input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
<label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
<label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
</legend>
</legend>
<div>
<div>
<label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
<label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
<input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
<input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
</div>
</div>
</fieldset>
</fieldset>
<?php do_action( 'bbp_theme_after_topic_form_revisions' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_revisions' ); ?>
<?php endif; ?>
<?php endif; ?>
</div>
<?php do_action( 'bbp_theme_before_topic_form_submit_wrapper' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_submit_wrapper' ); ?>
<div class="bbp-submit-wrapper">
<div class="bbp-submit-wrapper">
<?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
<?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
</div>
</div>
<?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?>
<?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?>
</div>
</div>
<?php bbp_topic_form_fields(); ?>
<?php bbp_topic_form_fields(); ?>
</fieldset>
</fieldset>
<?php do_action( 'bbp_theme_after_topic_form' ); ?>
<?php do_action( 'bbp_theme_after_topic_form' ); ?>
</form>
</form>
</div>
</div>
<?php endif; ?>
<?php elseif ( bbp_is_forum_closed() ) : ?>
<?php elseif ( bbp_is_forum_closed() ) : ?>
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="bbp-template-notice">
<div class="bbp-template-notice">
<p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
<p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
</div>
</div>
</div>
</div>
<?php else : ?>
<?php else : ?>
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="bbp-template-notice">
<div class="bbp-template-notice">
<p><?php is_user_logged_in() ? _e( 'You cannot create new topics.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></p>
<p><?php is_user_logged_in() ? _e( 'You cannot create new topics.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></p>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ( !bbp_is_single_forum() ) : ?>
<?php if ( !bbp_is_single_forum() ) : ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>