From 37ed9ac5abc76cce58aac155820072ff8e670768 Mon Sep 17 00:00:00 2001 From: Kelly Choyce-Dwan Date: Wed, 19 May 2021 22:20:58 +0000 Subject: [PATCH] Patterns API: Increase number of patterns returned. This bumps the max patterns returned in a query to 100, which should be enough to return all patterns, since we have a relatively low number for now. See https://github.com/WordPress/gutenberg/pull/28800#discussion_r633991933 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@10986 74240141-8908-4e6f-9713-ba540dce6ec7 --- api.wordpress.org/public_html/patterns/1.0/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api.wordpress.org/public_html/patterns/1.0/index.php b/api.wordpress.org/public_html/patterns/1.0/index.php index b4673e9bfa..0c99bb9bc6 100644 --- a/api.wordpress.org/public_html/patterns/1.0/index.php +++ b/api.wordpress.org/public_html/patterns/1.0/index.php @@ -45,8 +45,9 @@ function main( $query_string ) { $query_args['_fields'] = 'id,name,slug'; } else { // Return patterns. - $endpoint = '/wp/v2/wporg-pattern'; - $query_args['_fields'] = 'id,title,content,meta,category_slugs,keyword_slugs,pattern_content'; + $endpoint = '/wp/v2/wporg-pattern'; + $query_args['_fields'] = 'id,title,content,meta,category_slugs,keyword_slugs,pattern_content'; + $query_args['per_page'] = 100; // Sort alphabetically so that browsing is intuitive. Search will be sorted by rank. if ( ! isset( $query_args['search'] ) ) {