PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.6
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.6
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
← All changes | includes/Core/FAQBuilder.php +6 -13 4.5.44.2.6 View file →
@@ -245,11 +245,9 @@
245 245 '/faq/posts/(?P<type>\S+)',
246 246 [
247 247 'methods' => [ 'GET' ],
248 248 'callback' => [ $this, 'fetch_faq_posts' ],
249 - 'permission_callback' => function () {
250 - return current_user_can( 'edit_others_posts' );
251 - }
249 + 'permission_callback' => '__return_true'
252 250 ]
253 251 );
254 252
255 253 register_rest_route(
@@ -365,11 +363,9 @@
365 363 '/faq/uncategorised',
366 364 [
367 365 'methods' => [ 'GET' ],
368 366 'callback' => [ $this, 'get_uncategorised_faq' ],
369 - 'permission_callback' => function () {
370 - return current_user_can( 'edit_others_posts' );
371 - }
367 + 'permission_callback' => '__return_true'
372 368 ]
373 369 );
374 370
375 371 register_rest_route(
@@ -377,16 +373,13 @@
377 373 '/faq/category_search',
378 374 [
379 375 'methods' => [ 'GET' ],
380 376 'callback' => [ $this, 'category_search' ],
381 - 'permission_callback' => function () {
382 - return current_user_can( 'edit_others_posts' );
383 - },
377 + 'permission_callback' => '__return_true',
384 378 'args' => [
385 379 'title' => [
386 - 'type' => 'string',
387 - 'required' => true,
388 - 'sanitize_callback' => 'sanitize_text_field'
380 + 'type' => 'string',
381 + 'required' => true
389 382 ]
390 383 ]
391 384 ]
392 385 );
@@ -675,9 +668,9 @@
675 668
676 669 return get_posts(
677 670 [
678 671 'post_type' => 'betterdocs_faq',
679 - 'post_status' => current_user_can( 'edit_others_posts' ) ? [ 'publish', 'draft' ] : 'publish',
672 + 'post_status' => [ 'publish', 'draft' ],
680 673 'posts_per_page' => -1,
681 674 'tax_query' => [
682 675 'relation' => 'AND',
683 676 [