PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/bbpress/templates/default/bbpress/form-topic-split.php

https://bitbucket.org/Thane2376/death-edge.ru
PHP | 115 lines | 71 code | 38 blank | 6 comment | 6 complexity | 706fe6408f73e7872a1ec7c7e4a0ba8d MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, LGPL-3.0, AGPL-1.0
  1. <?php
  2. /**
  3. * Split Topic
  4. *
  5. * @package bbPress
  6. * @subpackage Theme
  7. */
  8. ?>
  9. <div id="bbpress-forums">
  10. <?php bbp_breadcrumb(); ?>
  11. <?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
  12. <div id="split-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-split">
  13. <form id="split_topic" name="split_topic" method="post" action="<?php the_permalink(); ?>">
  14. <fieldset class="bbp-form">
  15. <legend><?php printf( __( 'Split topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
  16. <div>
  17. <div class="bbp-template-notice info">
  18. <p><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></p>
  19. </div>
  20. <div class="bbp-template-notice">
  21. <p><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p>
  22. </div>
  23. <fieldset class="bbp-form">
  24. <legend><?php _e( 'Split Method', 'bbpress' ); ?></legend>
  25. <div>
  26. <input name="bbp_topic_split_option" id="bbp_topic_split_option_reply" type="radio" checked="checked" value="reply" tabindex="<?php bbp_tab_index(); ?>" />
  27. <label for="bbp_topic_split_option_reply"><?php printf( __( 'New topic in <strong>%s</strong> titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
  28. <input type="text" id="bbp_topic_split_destination_title" value="<?php printf( __( 'Split: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="35" name="bbp_topic_split_destination_title" />
  29. </div>
  30. <?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() ) ) ) ) : ?>
  31. <div>
  32. <input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" tabindex="<?php bbp_tab_index(); ?>" />
  33. <label for="bbp_topic_split_option_existing"><?php _e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
  34. <?php
  35. bbp_dropdown( array(
  36. 'post_type' => bbp_get_topic_post_type(),
  37. 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
  38. 'selected' => -1,
  39. 'exclude' => bbp_get_topic_id(),
  40. 'select_id' => 'bbp_destination_topic'
  41. ) );
  42. ?>
  43. </div>
  44. <?php endif; ?>
  45. </fieldset>
  46. <fieldset class="bbp-form">
  47. <legend><?php _e( 'Topic Extras', 'bbpress' ); ?></legend>
  48. <div>
  49. <?php if ( bbp_is_subscriptions_active() ) : ?>
  50. <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
  51. <label for="bbp_topic_subscribers"><?php _e( 'Copy subscribers to the new topic', 'bbpress' ); ?></label><br />
  52. <?php endif; ?>
  53. <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
  54. <label for="bbp_topic_favoriters"><?php _e( 'Copy favoriters to the new topic', 'bbpress' ); ?></label><br />
  55. <?php if ( bbp_allow_topic_tags() ) : ?>
  56. <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" tabindex="<?php bbp_tab_index(); ?>" />
  57. <label for="bbp_topic_tags"><?php _e( 'Copy topic tags to the new topic', 'bbpress' ); ?></label><br />
  58. <?php endif; ?>
  59. </div>
  60. </fieldset>
  61. <div class="bbp-template-notice error">
  62. <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
  63. </div>
  64. <div class="bbp-submit-wrapper">
  65. <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
  66. </div>
  67. </div>
  68. <?php bbp_split_topic_form_fields(); ?>
  69. </fieldset>
  70. </form>
  71. </div>
  72. <?php else : ?>
  73. <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
  74. <div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : _e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
  75. </div>
  76. <?php endif; ?>
  77. </div>