wp_embed_register_handler

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

WordPress Version: 4.4

/**
 * oEmbed API: Top-level oEmbed functionality
 *
 * @package WordPress
 * @subpackage oEmbed
 * @since 4.4.0
 */
/**
 * Registers an embed handler.
 *
 * Should probably only be used for sites that do not support oEmbed.
 *
 * @since 2.9.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param string   $id       An internal ID/name for the handler. Needs to be unique.
 * @param string   $regex    The regex that will be used to see if this handler should be used for a URL.
 * @param callable $callback The callback function that will be called if the regex is matched.
 * @param int      $priority Optional. Used to specify the order in which the registered handlers will
 *                           be tested. Default 10.
 */
function wp_embed_register_handler($id, $regex, $callback, $priority = 10)
{
    global $wp_embed;
    $wp_embed->register_handler($id, $regex, $callback, $priority);
}

WordPress Version: 4.3

/**
 * Registers an embed handler.
 *
 * Should probably only be used for sites that do not support oEmbed.
 *
 * @since 2.9.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param string   $id       An internal ID/name for the handler. Needs to be unique.
 * @param string   $regex    The regex that will be used to see if this handler should be used for a URL.
 * @param callback $callback The callback function that will be called if the regex is matched.
 * @param int      $priority Optional. Used to specify the order in which the registered handlers will
 *                           be tested. Default 10.
 */
function wp_embed_register_handler($id, $regex, $callback, $priority = 10)
{
    global $wp_embed;
    $wp_embed->register_handler($id, $regex, $callback, $priority);
}

WordPress Version: 4.2

/**
 * Registers an embed handler.
 *
 * Should probably only be used for sites that do not support oEmbed.
 *
 * @since 2.9.0
 *
 * @see WP_Embed::register_handler()
 *
 * @param string   $id       An internal ID/name for the handler. Needs to be unique.
 * @param string   $regex    The regex that will be used to see if this handler should be used for a URL.
 * @param callback $callback The callback function that will be called if the regex is matched.
 * @param int      $priority Optional. Used to specify the order in which the registered handlers will
 *                           be tested. Default 10.
 */
function wp_embed_register_handler($id, $regex, $callback, $priority = 10)
{
    global $wp_embed;
    $wp_embed->register_handler($id, $regex, $callback, $priority);
}

WordPress Version: 4.1

/**
 * Register an embed handler. This function should probably only be used for sites that do not support oEmbed.
 *
 * @since 2.9.0
 * @see WP_Embed::register_handler()
 *
 * @global WP_Embed $wp_embed
 * @param string   $id
 * @param string   $regex
 * @param callable $callback
 * @param int      $priority
 */
function wp_embed_register_handler($id, $regex, $callback, $priority = 10)
{
    global $wp_embed;
    $wp_embed->register_handler($id, $regex, $callback, $priority);
}

WordPress Version: 3.7

/**
 * Register an embed handler. This function should probably only be used for sites that do not support oEmbed.
 *
 * @since 2.9.0
 * @see WP_Embed::register_handler()
 */
function wp_embed_register_handler($id, $regex, $callback, $priority = 10)
{
    global $wp_embed;
    $wp_embed->register_handler($id, $regex, $callback, $priority);
}