Skip to content

Commit

Permalink
Inserter: Update Openverse API URLs (#62241)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: zackkrida <zackkrida@git.wordpress.org>
  • Loading branch information
5 people committed Jun 3, 2024
1 parent da98bdb commit e5d2a5a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ wp.data.dispatch( 'core/block-editor' ).registerInserterMediaCategory( {
per_page: 'page_size',
search: 'q',
};
const url = new URL( 'https://api.openverse.engineering/v1/images/' );
const url = new URL( 'https://api.openverse.org/v1/images/' );
Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
const queryKey = mapFromInserterMediaRequest[ key ] || key;
url.searchParams.set( queryKey, value );
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,7 @@ export function __unstableSetTemporarilyEditingAsBlocks(
* per_page: 'page_size',
* search: 'q',
* };
* const url = new URL( 'https://api.openverse.engineering/v1/images/' );
* const url = new URL( 'https://api.openverse.org/v1/images/' );
* Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
* const queryKey = mapFromInserterMediaRequest[ key ] || key;
* url.searchParams.set( queryKey, value );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ const inserterMediaCategories = [
per_page: 'page_size',
search: 'q',
};
const url = new URL(
'https://api.openverse.engineering/v1/images/'
);
const url = new URL( 'https://api.openverse.org/v1/images/' );
Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
const queryKey = mapFromInserterMediaRequest[ key ] || key;
url.searchParams.set( queryKey, value );
Expand Down
4 changes: 1 addition & 3 deletions packages/editor/src/components/media-categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ const inserterMediaCategories = [
per_page: 'page_size',
search: 'q',
};
const url = new URL(
'https://api.openverse.engineering/v1/images/'
);
const url = new URL( 'https://api.openverse.org/v1/images/' );
Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
const queryKey = mapFromInserterMediaRequest[ key ] || key;
url.searchParams.set( queryKey, value );
Expand Down

0 comments on commit e5d2a5a

Please sign in to comment.