PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.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 All 30 releases
← All changes | includes/Blocks/Render/forum-ajax.php +3 -9 trunk → 2.5.0 View file →
@@ -155,9 +155,9 @@
155 155 }
156 156
157 157 // Enqueue styles/scripts.
158 158 if ( ! wp_style_is( 'elegant-icon', 'registered' ) ) {
159 - wp_register_style( 'elegant-icon', FORUMAX_VEND . 'elegant-icon/style.css', [], FORUMAX_VERSION );
159 + wp_register_style( 'elegant-icon', FORUMAX_VEND . '/elegant-icon/style.css' );
160 160 }
161 161 if ( ! wp_script_is( 'bbpc-ajax', 'registered' ) ) {
162 162 wp_register_script( 'bbpc-ajax', FORUMAX_FRONT_ASS . 'js/ajax.js', array( 'jquery' ), FORUMAX_VERSION, true );
163 163 }
@@ -249,18 +249,13 @@
249 249 $styles .= "{$id} .frmx-load-more-btn:hover { background: #2563eb !important; }";
250 250 }
251 251
252 252 // Query
253 - // "Load more" reveals pre-rendered topics, so it needs more than one
254 - // page, but never the whole site (which rendered every topic).
255 - $load_more_max = max( $ppp2, (int) apply_filters( 'forumax_forum_ajax_load_more_max', 100, $attributes ) );
256 -
257 253 $query_args = array(
258 254 'post_type' => 'topic',
259 - 'posts_per_page' => $load_more_enabled ? $load_more_max : $ppp2,
255 + 'posts_per_page' => $load_more_enabled ? -1 : $ppp2,
260 256 'order' => $order,
261 257 'orderby' => $orderby,
262 - 'no_found_rows' => true,
263 258 );
264 259
265 260 // Forum ID filter (include).
266 261 if ( ! empty( $forum_filter_ids ) ) {
@@ -543,9 +538,8 @@
543 538 </div>
544 539 <?php
545 540 return ob_get_clean();
546 541 } catch ( \Throwable $e ) {
547 - // Only editors see the reason; visitors shouldn't get internal errors.
548 - return current_user_can( 'edit_posts' ) ? '<div>Error rendering block: ' . esc_html( $e->getMessage() ) . '</div>' : '';
542 + return '<div>Error rendering block: ' . esc_html( $e->getMessage() ) . '</div>';
549 543 }
550 544 }
551 545 }