PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / trunk
Forumax – AI Powered Advanced Community Forum Plugin vtrunk
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / templates / form-topic-merge.php

form-topic-merge.php in Forumax – AI Powered Advanced Community Forum Plugin trunk, at templates/form-topic-merge.php

122 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 <div id="bbpress-forums" class="bbpress-wrapper">
15
16 <?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
17
18 <div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
19
20 <form id="merge_topic" name="merge_topic" method="post">
21
22 <fieldset class="bbp-form">
23
24 <legend><?php printf( esc_html__( 'Merge topic "%s"', 'forumax' ), bbp_get_topic_title() ); ?></legend>
25
26 <div>
27
28 <div class="bbp-template-notice info">
29 <ul>
30 <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.', 'forumax' ); ?></li>
31 <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.', 'forumax' ); ?></li>
32 </ul>
33 </div>
34
35 <div class="bbp-template-notice">
36 <ul>
37 <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.', 'forumax' ); ?></li>
38 </ul>
39 </div>
40
41 <fieldset class="bbp-form">
42 <legend><?php esc_html_e( 'Destination', 'forumax' ); ?></legend>
43 <div>
44 <?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() ) ) ) ) : ?>
45
46 <label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'forumax' ); ?></label>
47
48 <?php
49 bbp_dropdown( array(
50 'post_type' => bbp_get_topic_post_type(),
51 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
52 'post_status' => bbp_get_public_topic_statuses(),
53 'selected' => -1,
54 'exclude' => bbp_get_topic_id(),
55 'select_id' => 'bbp_destination_topic'
56 ) );
57 ?>
58
59 <?php else : ?>
60
61 <label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'forumax' ); ?></label>
62
63 <?php endif; ?>
64
65 </div>
66 </fieldset>
67
68 <fieldset class="bbp-form">
69 <legend><?php esc_html_e( 'Topic Extras', 'forumax' ); ?></legend>
70
71 <div>
72
73 <?php if ( bbp_is_subscriptions_active() ) : ?>
74
75 <input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
76 <label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'forumax' ); ?></label><br />
77
78 <?php endif; ?>
79
80 <input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
81 <label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'forumax' ); ?></label><br />
82
83 <?php if ( bbp_allow_topic_tags() ) : ?>
84
85 <input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
86 <label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'forumax' ); ?></label><br />
87
88 <?php endif; ?>
89
90 </div>
91 </fieldset>
92
93 <div class="bbp-template-notice error">
94 <ul>
95 <li><?php esc_html_e( 'This process cannot be undone.', 'forumax' ); ?></li>
96 </ul>
97 </div>
98
99 <div class="bbp-submit-wrapper">
100 <button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit fill-brand"><?php esc_html_e( 'Submit', 'forumax' ); ?></button>
101 </div>
102 </div>
103
104 <?php bbp_merge_topic_form_fields(); ?>
105
106 </fieldset>
107 </form>
108 </div>
109
110 <?php else : ?>
111
112 <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
113 <div class="entry-content"><?php is_user_logged_in()
114 ? esc_html_e( 'You do not have permission to edit this topic.', 'forumax' )
115 : esc_html_e( 'You cannot edit this topic.', 'forumax' );
116 ?></div>
117 </div>
118
119 <?php endif; ?>
120
121 </div>
122