WPDev.one
Core Class

WP_Embed

class WP_Embed // Constructor: function Object() { [native code] }

API for easily embedding rich media such as videos and images into content.

Methods 13 methods

Method / Return Description
__construct()
void

Constructor

run_shortcode()
string

Processes the [embed] shortcode.

Parameters: $content: mixed
maybe_run_ajax_cache()
void

If a post/page was saved, then output JavaScript to make

register_handler()
void

Registers an embed handler.

Parameters: $id: mixed, $regex: mixed, $callback: mixed, $priority: mixed
unregister_handler()
void

Unregisters a previously-registered embed handler.

Parameters: $id: mixed, $priority: mixed
get_embed_handler_html()
(string

Returns embed HTML for a given URL from embed handlers.

Parameters: $attr: mixed, $url: mixed
shortcode()
(string

The do_shortcode() callback function.

Parameters: $attr: mixed, $url: mixed
delete_oembed_caches()
void

Deletes all oEmbed caches. Unused by core as of 4.0.0.

Parameters: $post_id: mixed
cache_oembed()
void

Triggers a caching of all oEmbed results.

Parameters: $post_id: mixed
autoembed()
string

Passes any unlinked URLs that are on their own line to WP_Embed::shortcode() for potential embedding.

Parameters: $content: mixed
autoembed_callback()
string

Callback function for WP_Embed::autoembed().

Parameters: $matches: mixed
maybe_make_link()
(string

Conditionally makes a hyperlink based on an internal class variable.

Parameters: $url: mixed
find_oembed_post_id()
(int

Finds the oEmbed cache post ID for a given cache key.

Parameters: $cache_key: mixed

Properties

Property / Type Description
$handlers
mixed
public
No description available.
$post_ID
mixed
public
No description available.
$usecache
mixed
public
No description available.
$linkifunknown
mixed
public
No description available.
$last_attr
mixed
public
No description available.
$last_url
mixed
public
No description available.
$return_false_on_fail
mixed
public
No description available.

Class Information

Since Version
2.9.0
Source File
wp-includes/class-wp-embed.php
Advertisement