[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/templates/default/bbpress/ -> form-reply-move.php (source)

   1  <?php
   2  
   3  /**
   4   * Move Reply
   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="move-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-move">
  22  
  23              <form id="move_reply" name="move_reply" method="post">
  24  
  25                  <fieldset class="bbp-form">
  26  
  27                      <legend><?php printf( esc_html__( 'Move reply "%s"', 'bbpress' ), bbp_get_reply_title() ); ?></legend>
  28  
  29                      <div>
  30  
  31                          <div class="bbp-template-notice info">
  32                              <ul>
  33                                  <li><?php esc_html_e( 'You can either make this reply a new topic with a new title, or merge it into an existing topic.', 'bbpress' ); ?></li>
  34                              </ul>
  35                          </div>
  36  
  37                          <div class="bbp-template-notice">
  38                              <ul>
  39                                  <li><?php esc_html_e( 'If you choose an existing topic, replies will be ordered by the time and date they were created.', 'bbpress' ); ?></li>
  40                              </ul>
  41                          </div>
  42  
  43                          <fieldset class="bbp-form">
  44                              <legend><?php esc_html_e( 'Move Method', 'bbpress' ); ?></legend>
  45  
  46                              <div>
  47                                  <input name="bbp_reply_move_option" id="bbp_reply_move_option_reply" type="radio" checked="checked" value="topic" />
  48                                  <label for="bbp_reply_move_option_reply"><?php printf( esc_html__( 'New topic in %s titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_reply_forum_id( bbp_get_reply_id() ) ) ); ?></label>
  49                                  <input type="text" id="bbp_reply_move_destination_title" value="<?php printf( esc_html__( 'Moved: %s', 'bbpress' ), bbp_get_reply_title() ); ?>" size="35" name="bbp_reply_move_destination_title" />
  50                              </div>
  51  
  52                              <?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) ) ) ) : ?>
  53  
  54                                  <div>
  55                                      <input name="bbp_reply_move_option" id="bbp_reply_move_option_existing" type="radio" value="existing" />
  56                                      <label for="bbp_reply_move_option_existing"><?php esc_html_e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
  57  
  58                                      <?php
  59                                          bbp_dropdown( array(
  60                                              'post_type'   => bbp_get_topic_post_type(),
  61                                              'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ),
  62                                              'selected'    => -1,
  63                                              'exclude'     => bbp_get_reply_topic_id( bbp_get_reply_id() ),
  64                                              'select_id'   => 'bbp_destination_topic'
  65                                          ) );
  66                                      ?>
  67  
  68                                  </div>
  69  
  70                              <?php endif; ?>
  71  
  72                          </fieldset>
  73  
  74                          <div class="bbp-template-notice error" role="alert" tabindex="-1">
  75                              <ul>
  76                                  <li><?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></li>
  77                              </ul>
  78                          </div>
  79  
  80                          <div class="bbp-submit-wrapper">
  81                              <button type="submit" id="bbp_move_reply_submit" name="bbp_move_reply_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
  82                          </div>
  83                      </div>
  84  
  85                      <?php bbp_move_reply_form_fields(); ?>
  86  
  87                  </fieldset>
  88              </form>
  89          </div>
  90  
  91      <?php else : ?>
  92  
  93          <div id="no-reply-<?php bbp_reply_id(); ?>" class="bbp-no-reply">
  94              <div class="entry-content"><?php is_user_logged_in()
  95                  ? esc_html_e( 'You do not have permission to edit this reply.', 'bbpress' )
  96                  : esc_html_e( 'You cannot edit this reply.',                    'bbpress' );
  97              ?></div>
  98          </div>
  99  
 100      <?php endif; ?>
 101  
 102  </div>


Generated: Thu Mar 28 01:00:51 2024 Cross-referenced by PHPXref 0.7.1