EOF; } // disable oembed if url is not my site url add_filter('oembed_request_post_id', 'niu_check_oembed_url', 10, 2); function niu_check_oembed_url($post_id, $url) { if (!preg_match('/^'.preg_quote(get_site_url(), '/').'/', $url)) { return 0; } return $post_id; }