Changeset 53218
- Timestamp:
- 04/19/2022 02:56:40 PM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-patterns.php
r53152 r53218 156 156 157 157 $request = new WP_REST_Request( 'GET', '/wp/v2/pattern-directory/patterns' ); 158 $request['slug'] = implode( ',', $pattern_settings );158 $request['slug'] = $pattern_settings; 159 159 $response = rest_do_request( $request ); 160 160 if ( $response->is_error() ) { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
r53152 r53218 26 26 */ 27 27 public function __construct() { 28 $this->namespace 29 28 $this->namespace = 'wp/v2'; 29 $this->rest_base = 'pattern-directory'; 30 30 } 31 31 … … 138 138 139 139 if ( ! $raw_patterns ) { 140 $api_url = add_query_arg( 141 array_map( 'rawurlencode', $query_args ), 142 'http://api.wordpress.org/patterns/1.0/' 143 ); 144 140 $api_url = 'http://api.wordpress.org/patterns/1.0/?' . build_query( $query_args ); 145 141 if ( wp_http_supports( array( 'ssl' ) ) ) { 146 142 $api_url = set_url_scheme( $api_url, 'https' );
Note: See TracChangeset
for help on using the changeset viewer.