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 +12 -11 2.4.22.2.0 View file →
@@ -117,13 +117,17 @@
117 117
118 118 <!-- Children topics. -->
119 119 <?php include __DIR__ . '/admin_ui/topics.php'; ?>
120 120
121 - <?php if ( $children->post_count > 0 ) : ?>
122 - <div class="controls bbpc-admin-pagination" style="display:none;">
121 + <?php
122 + if ( $children->post_count > 10 ) :
123 + ?>
124 + <div class="controls bbpc-admin-pagination">
123 125 <div class="mixitup-control mixitup-page-list"></div>
124 126 </div>
125 - <?php endif; ?>
127 + <?php
128 + endif;
129 + ?>
126 130
127 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 ); ?>">
128 132 <?php esc_html_e( 'Add Topic', 'forumax' ); ?>
129 133 </a>
@@ -180,16 +184,13 @@
180 184 callbacks: {
181 185 onMixEnd: function(state) {
182 186 var pagination = state.container.querySelector('.bbpc-admin-pagination');
183 187 if ( pagination ) {
184 - // Count matching items directly from the DOM using the active
185 - // filter selector. MixItUp always renders prev/next buttons so
186 - // children.length is unreliable for detecting multi-page results.
187 - var selector = state.activeFilter ? state.activeFilter.selector : '';
188 - var matchCount = ( ! selector || selector === 'all' )
189 - ? state.container.querySelectorAll('.mix').length
190 - : state.container.querySelectorAll(selector).length;
191 - pagination.style.display = matchCount > 10 ? 'block' : 'none';
188 + if ( state.totalShow === 0 ) {
189 + pagination.style.display = 'none';
190 + } else {
191 + pagination.style.display = 'block';
192 + }
192 193 }
193 194 }
194 195 }
195 196 };