You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pattern Directory API: Add support for pagination parameters (#45293)
* Pattern Directory API: Add support for pagination parameters
* Fix linter & php compat issues
* Remove the 6.0 filter
* Mirror GB 6.0 to also pass through the gutenberg version
* Add 'per_page', 'page', 'offset', 'order', and 'orderby' to collection params
* Add initial tests for new query parameters
* Bump the default per_page to 100 to match w.org API
* Update function name
* Fix linter issues
* remove obsolete `get_items`
Co-authored-by: ntsekouras <ntsekouras@outlook.com>
* Use network-wide transient to improve performance. The locale is the only site
64
53
* configuration that affects the response, and it's included in the transient key.
65
54
*/
@@ -71,7 +60,7 @@ public function get_items( $request ) {
71
60
$api_url = set_url_scheme( $api_url, 'https' );
72
61
}
73
62
74
-
/**
63
+
/*
75
64
* Default to a short TTL, to mitigate cache stampedes on high-traffic sites.
76
65
* This assumes that most errors will be short-lived, e.g., packet loss that causes the
77
66
* first request to fail, but a follow-up one will succeed. The value should be high
@@ -90,7 +79,7 @@ public function get_items( $request ) {
90
79
$raw_patterns = newWP_Error(
91
80
'pattern_api_failed',
92
81
sprintf(
93
-
/* translators: %s: Support forums URL. */
82
+
/* translators: %s: Support forums URL. */
94
83
__( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.', 'gutenberg' ),
0 commit comments