PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.13.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.13.0
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
← All changes | includes/api/search-controller.php +2 -6 trunk2.13.0 View file →
@@ -49,12 +49,10 @@
49 49 'required' => true,
50 50 'type' => 'string',
51 51 'description' => 'Post type to search.',
52 52 'sanitize_callback' => 'sanitize_key',
53 - // Public route: only a post type visitors can already
54 - // see may be searched, never an internal one.
55 53 'validate_callback' => function( $param ) {
56 - return 'any' === $param || is_post_type_viewable( (string) $param );
54 + return $param === 'any' || post_type_exists( $param );
57 55 },
58 56 ),
59 57 ),
60 58 )
@@ -68,11 +66,9 @@
68 66 $current_page_id = $request->get_param( 'current_page_id' );
69 67
70 68 $args = array(
71 69 's' => $searchQuery,
72 - // A public, repeatable request must not render every matching post.
73 - 'posts_per_page' => max( 1, (int) apply_filters( 'ablocks/search/max_results', 20, $source ) ),
74 - 'no_found_rows' => true,
70 + 'posts_per_page' => -1,
75 71 'post_type' => $source,
76 72 'post_status' => 'publish',
77 73 );
78 74