WordPress.org

Make WordPress Core

Ticket #36767: 36767.diff

File 36767.diff, 533 bytes (added by kraftbj, 15 months ago)

Return out early if there's no post ID found.

  • src/wp-includes/embed.php

     
    11001100        /** This filter is documented in wp-includes/class-wp-oembed-controller.php */ 
    11011101        $post_id = apply_filters( 'oembed_request_post_id', $post_id, $url ); 
    11021102 
     1103        if ( ! $post_id ) { 
     1104                return $result; 
     1105        } 
     1106 
    11031107        $width = isset( $args['width'] ) ? $args['width'] : 0; 
    11041108 
    11051109        $data = get_oembed_response_data( $post_id, $width );