Title: _wp_oembed_get_object
Published: April 25, 2014
Last modified: February 24, 2026

---

# _wp_oembed_get_object(): 󠀁[WP_oEmbed](https://developer.wordpress.org/reference/classes/wp_oembed/)󠁿

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Returns the initialized [WP_oEmbed](https://developer.wordpress.org/reference/classes/wp_oembed/)
object.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#return)󠁿

 [WP_oEmbed](https://developer.wordpress.org/reference/classes/wp_oembed/) object.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#source)󠁿

    ```php
    function _wp_oembed_get_object() {
    	static $wp_oembed = null;

    	if ( is_null( $wp_oembed ) ) {
    		$wp_oembed = new WP_oEmbed();
    	}
    	return $wp_oembed;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/embed.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/embed.php#L126)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/embed.php#L126-L133)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_oEmbed::__construct()](https://developer.wordpress.org/reference/classes/wp_oembed/__construct/)`wp-includes/class-wp-oembed.php` |

Constructor.

  |

| Used by | Description | 
| [WP_oEmbed_Controller::get_proxy_item()](https://developer.wordpress.org/reference/classes/wp_oembed_controller/get_proxy_item/)`wp-includes/class-wp-oembed-controller.php` |

Callback for the proxy API endpoint.

  | 
| [wp_filter_pre_oembed_result()](https://developer.wordpress.org/reference/functions/wp_filter_pre_oembed_result/)`wp-includes/embed.php` |

Filters the oEmbed result before any HTTP requests are made.

  | 
| [wp_filter_oembed_result()](https://developer.wordpress.org/reference/functions/wp_filter_oembed_result/)`wp-includes/embed.php` |

Filters the given oEmbed HTML.

  | 
| [wp_oembed_get()](https://developer.wordpress.org/reference/functions/wp_oembed_get/)`wp-includes/embed.php` |

Attempts to fetch the embed HTML for a provided URL using oEmbed.

  | 
| [wp_oembed_add_provider()](https://developer.wordpress.org/reference/functions/wp_oembed_add_provider/)`wp-includes/embed.php` |

Adds a URL format and oEmbed provider URL pair.

  | 
| [wp_oembed_remove_provider()](https://developer.wordpress.org/reference/functions/wp_oembed_remove_provider/)`wp-includes/embed.php` |

Removes an oEmbed provider.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_wp_oembed_get_object/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_wp_oembed_get_object%2F)
before being able to contribute a note or feedback.