wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_embed_register_handler › WordPress Function

Seit2.9.0
Veraltetn/v
wp_embed_register_handler ( $id, $regex, $callback, $priority = 10 )
Parameter: (4)
  • (string) $id An internal ID/name for the handler. Needs to be unique.
    Erforderlich: Ja
  • (string) $regex The regex that will be used to see if this handler should be used for a URL.
    Erforderlich: Ja
  • (callable) $callback The callback function that will be called if the regex is matched.
    Erforderlich: Ja
  • (int) $priority Optional. Used to specify the order in which the registered handlers will be tested. Default 10.
    Erforderlich: Nein
    Standard: 10
Definiert in:
Codex:

Registers an embed handler.

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


Quellcode

function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) {
	global $wp_embed;
	$wp_embed->register_handler( $id, $regex, $callback, $priority );
}