[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/templates/default/bbpress/ -> form-topic-merge.php (source)

   1  <?php
   2  
   3  /**
   4   * Merge Topic
   5   *
   6   * @package bbPress
   7   * @subpackage Theme
   8   */
   9  
  10  // Exit if accessed directly
  11  defined( 'ABSPATH' ) || exit;
  12  
  13  ?>
  14  
  15  <div id="bbpress-forums" class="bbpress-wrapper">
  16  
  17      <?php bbp_breadcrumb(); ?>
  18  
  19      <?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
  20  
  21          <div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
  22  
  23              <form id="merge_topic" name="merge_topic" method="post">
  24  
  25                  <fieldset class="bbp-form">
  26  
  27                      <legend><?php printf( esc_html__( 'Merge topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
  28  
  29                      <div>
  30  
  31                          <div class="bbp-template-notice info">
  32                              <ul>
  33                                  <li><?php esc_html_e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></li>
  34                                  <li><?php esc_html_e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.',                                  'bbpress' ); ?></li>
  35                              </ul>
  36                          </div>
  37  
  38                          <div class="bbp-template-notice">
  39                              <ul>
  40                                  <li><?php esc_html_e( 'Replies to both topics are merged chronologically, ordered by the time and date they were published. Topics may be updated to a 1 second difference to maintain chronological order based on the merge direction.', 'bbpress' ); ?></li>
  41                              </ul>
  42                          </div>
  43  
  44                          <fieldset class="bbp-form">
  45                              <legend><?php esc_html_e( 'Destination', 'bbpress' ); ?></legend>
  46                              <div>
  47                                  <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
  48  
  49                                      <label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'bbpress' ); ?></label>
  50  
  51                                      <?php
  52                                          bbp_dropdown( array(
  53                                              'post_type'   => bbp_get_topic_post_type(),
  54                                              'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
  55                                              'post_status' => bbp_get_public_topic_statuses(),
  56                                              'selected'    => -1,
  57                                              'exclude'     => bbp_get_topic_id(),
  58                                              'select_id'   => 'bbp_destination_topic'
  59                                          ) );
  60                                      ?>
  61  
  62                                  <?php else : ?>
  63  
  64                                      <label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>
  65  
  66                                  <?php endif; ?>
  67  
  68                              </div>
  69                          </fieldset>
  70  
  71                          <fieldset class="bbp-form">
  72                              <legend><?php esc_html_e( 'Topic Extras', 'bbpress' ); ?></legend>
  73  
  74                              <div>
  75  
  76                                  <?php if ( bbp_is_subscriptions_active() ) : ?>
  77  
  78                                      <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
  79                                      <label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'bbpress' ); ?></label><br />
  80  
  81                                  <?php endif; ?>
  82  
  83                                  <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
  84                                  <label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'bbpress' ); ?></label><br />
  85  
  86                                  <?php if ( bbp_allow_topic_tags() ) : ?>
  87  
  88                                      <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
  89                                      <label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'bbpress' ); ?></label><br />
  90  
  91                                  <?php endif; ?>
  92  
  93                              </div>
  94                          </fieldset>
  95  
  96                          <div class="bbp-template-notice error">
  97                              <ul>
  98                                  <li><?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></li>
  99                              </ul>
 100                          </div>
 101  
 102                          <div class="bbp-submit-wrapper">
 103                              <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
 104                          </div>
 105                      </div>
 106  
 107                      <?php bbp_merge_topic_form_fields(); ?>
 108  
 109                  </fieldset>
 110              </form>
 111          </div>
 112  
 113      <?php else : ?>
 114  
 115          <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
 116              <div class="entry-content"><?php is_user_logged_in()
 117                  ? esc_html_e( 'You do not have permission to edit this topic.', 'bbpress' )
 118                  : esc_html_e( 'You cannot edit this topic.',                    'bbpress' );
 119              ?></div>
 120          </div>
 121  
 122      <?php endif; ?>
 123  
 124  </div>


Generated: Sun Jul 21 01:01:32 2019 Cross-referenced by PHPXref 0.7.1