Skip to content

Commit

Permalink
Remove Social Media block API endpoint (#1264)
Browse files Browse the repository at this point in the history
We forgot it when moving this block to the theme
  • Loading branch information
mleray authored Nov 26, 2024
1 parent 47c885b commit f6cb987
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions classes/rest/class-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,27 +177,6 @@ public static function endpoints(): void {
]
);

/**
* Endpoint to get the code for Instagram embeds in the Social Media block.
*/
register_rest_route(
self::REST_NAMESPACE,
'/get-instagram-embed',
[
[
'permission_callback' => static function () {
return true;
},
'methods' => WP_REST_Server::READABLE,
'callback' => static function ( $fields ) {
$url = $fields['url'] ?? '';
$embed_code = SocialMedia::get_fb_oembed_html( $url, 'instagram' );
return rest_ensure_response( $embed_code );
},
],
]
);

register_rest_route(
self::REST_NAMESPACE,
'/get-en-session-token',
Expand Down

0 comments on commit f6cb987

Please sign in to comment.