wp_embed_register_handler

SummerySummery

Registers an embed handler.

Syntax

wp_embed_register_handler( string $id, string $regex, callable $callback, int $priority = 10 )

DescriptionDescription

Should probably only be used for sites that do not support oEmbed.

ParametersParameters

$id

(string) (Required) An internal ID/name for the handler. Needs to be unique.

$regex

(string) (Required) The regex that will be used to see if this handler should be used for a URL.

$callback

(callable) (Required) The callback function that will be called if the regex is matched.

$priority

(int) (Optional) Used to specify the order in which the registered handlers will be tested.

Default value: 10

SourceSource

File: wp-includes/embed.php


			

ChangelogChangelog

Changelog
Version Description
2.9.0 Introduced.
Scroll to Top