wp_ajax_oembed_cache

The timeline below displays how wordpress function wp_ajax_oembed_cache has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Handles oEmbed caching via AJAX.
 *
 * @since 3.1.0
 *
 * @global WP_Embed $wp_embed
 */
function wp_ajax_oembed_cache()
{
    $GLOBALS['wp_embed']->cache_oembed($_GET['post']);
    wp_die(0);
}

WordPress Version: 4.3

/**
 * Ajax handler for oEmbed caching.
 *
 * @since 3.1.0
 *
 * @global WP_Embed $wp_embed
 */
function wp_ajax_oembed_cache()
{
    $GLOBALS['wp_embed']->cache_oembed($_GET['post']);
    wp_die(0);
}

WordPress Version: 4.0

/**
 * Ajax handler for oEmbed caching.
 *
 * @since 3.1.0
 */
function wp_ajax_oembed_cache()
{
    $GLOBALS['wp_embed']->cache_oembed($_GET['post']);
    wp_die(0);
}

WordPress Version: 3.7

function wp_ajax_oembed_cache()
{
    global $wp_embed;
    $return = $wp_embed->cache_oembed($_GET['post']) ? '1' : '0';
    wp_die($return);
}