PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.2.0
Forumax – AI Powered Advanced Community Forum Plugin v2.2.0
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
← All changes | includes/admin/menu/admin_ui.php +41 -10 1.2.92.2.0 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 if ( ! class_exists( 'bbPress' ) ) {
3 3 return;
4 4 }
5 +
5 6 $parent_forums = [];
6 7 $fcount = wp_count_posts( bbp_get_forum_post_type() );
7 8 $forum_count = (int) ( $fcount->publish + $fcount->hidden + $fcount->spam );
8 -$bbpc_opt = get_option( 'bbp_core_settings' );
9 9 ?>
10 10 <div class="wrap">
11 11 <div class="body-dark">
12 12 <?php
@@ -73,9 +73,9 @@
73 73 $count_open++;
74 74 }
75 75
76 76 // Count spam( hidden ) topics.
77 - if ( bbp_is_topic_spam( $topic_id ) ) {
77 + if ( bbp_is_topic_spam( $topic_id ) || bbp_is_topic_pending( $topic_id ) ) {
78 78 $count_hidden++;
79 79 }
80 80
81 81 // Replies count.
@@ -83,10 +83,10 @@
83 83 $count_no_reply++;
84 84 }
85 85
86 86 // Count solved.
87 - // Before using $GLOBALS['bbp_solved_topic'], check if it is set
88 - if (isset($GLOBALS['bbp_solved_topic']) && $GLOBALS['bbp_solved_topic']->is_solved($topic_id)) {
87 + // Before using $GLOBALS['forumax_solve_topic'], check if it is set
88 + if (isset($GLOBALS['forumax_solve_topic']) && $GLOBALS['forumax_solve_topic']->is_solved($topic_id)) {
89 89 $count_solved++;
90 90 } else {
91 91 $count_unsolved++;
92 92 }
@@ -117,10 +117,20 @@
117 117
118 118 <!-- Children topics. -->
119 119 <?php include __DIR__ . '/admin_ui/topics.php'; ?>
120 120
121 + <?php
122 + if ( $children->post_count > 10 ) :
123 + ?>
124 + <div class="controls bbpc-admin-pagination">
125 + <div class="mixitup-control mixitup-page-list"></div>
126 + </div>
127 + <?php
128 + endif;
129 + ?>
130 +
121 131 <a class="easydocs-btn easydocs-btn-outline-blue easydocs-btn-sm easydocs-btn-round button button-info section-doc" id="bbpc-topic" target="_blank" name="submit" href="javascript:void(0)" bbp_forum_id="<?php echo esc_attr( $item ); ?>">
122 - <?php esc_html_e( 'Add Topic', 'bbp-core' ); ?>
132 + <?php esc_html_e( 'Add Topic', 'forumax' ); ?>
123 133 </a>
124 134 </div>
125 135 <?php
126 136 endforeach;
@@ -133,14 +143,20 @@
133 143 <?php
134 144 else :
135 145 ?>
136 146 <div class="eazydocs-no-content">
137 - <img src="<?php echo BBPC_IMG; ?>/icon/folder-open.png" alt="<?php esc_attr_e( 'Folder Open', 'bbp-core' ); ?>">
138 - <p class="big-p"> <?php esc_html_e( 'No forum has been found . Perhaps', 'bbp-core' ); ?> </p>
139 - <p> <br>
147 + <img src="<?php echo esc_url( FORUMAX_IMG . 'icon/folder-open.png' ); ?>" alt="<?php esc_attr_e( 'Folder Open', 'forumax' ); ?>">
148 + <p class="big-p"> <?php esc_html_e( 'No forums found. Get started by creating a new forum or importing demo data.', 'forumax' ); ?> </p>
149 + <p class="forumax-empty-actions">
140 150 <a href="javascript:void(0)" type="button" id="bbpc-forum" class="button button-primary ezd-btn btn-lg">
141 - <?php esc_html_e( 'Create Forum', 'bbp-core' ); ?>
151 + <span class="dashicons dashicons-plus-alt2"></span>
152 + <?php esc_html_e( 'Create Forum', 'forumax' ); ?>
142 153 </a>
154 + <span class="forumax-actions-separator"><?php esc_html_e( 'or', 'forumax' ); ?></span>
155 + <a href="javascript:void(0)" type="button" id="forumax-import-demo" class="button ezd-btn btn-lg forumax-import-demo-btn">
156 + <span class="dashicons dashicons-database-import"></span>
157 + <?php esc_html_e( 'Import Demo Data', 'forumax' ); ?>
158 + </a>
143 159 </p>
144 160 </div>
145 161 <?php
146 162 endif;
@@ -159,9 +175,24 @@
159 175 animation: {
160 176 enable: false,
161 177 },
162 178 load: {
163 - filter: '<?php echo esc_js( $bbpc_opt['default_filter'] ?? '.open-topics' ); ?>'
179 + filter: '<?php echo esc_js( forumax_get_opt( 'default_filter', '.open-topics' ) ); ?>'
180 + },
181 + pagination: {
182 + limit: 10,
183 + },
184 + callbacks: {
185 + onMixEnd: function(state) {
186 + var pagination = state.container.querySelector('.bbpc-admin-pagination');
187 + if ( pagination ) {
188 + if ( state.totalShow === 0 ) {
189 + pagination.style.display = 'none';
190 + } else {
191 + pagination.style.display = 'block';
192 + }
193 + }
194 + }
164 195 }
165 196 };
166 197 for (let i = 0; i < docContainer.length; i++) {
167 198 var mixer1 = mixitup(docContainer[i], config);