--- a/wp/wp-includes/class-wp-oembed-controller.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/class-wp-oembed-controller.php Fri Sep 05 18:40:08 2025 +0200
@@ -15,6 +15,7 @@
*
* @since 4.4.0
*/
+#[AllowDynamicProperties]
final class WP_oEmbed_Controller {
/**
* Register the oEmbed REST API route.
@@ -159,13 +160,14 @@
* @since 4.8.0
*
* @see WP_oEmbed::get_html()
- * @global WP_Embed $wp_embed
+ * @global WP_Embed $wp_embed WordPress Embed object.
+ * @global WP_Scripts $wp_scripts
*
* @param WP_REST_Request $request Full data about the request.
* @return object|WP_Error oEmbed response data or WP_Error on failure.
*/
public function get_proxy_item( $request ) {
- global $wp_embed;
+ global $wp_embed, $wp_scripts;
$args = $request->get_params();
@@ -203,7 +205,6 @@
$html = $wp_embed->get_embed_handler_html( $args, $url );
if ( $html ) {
- global $wp_scripts;
// Check if any scripts were enqueued by the shortcode, and include them in the response.
$enqueued_scripts = array();