You are here

function EMMODULE_PROVIDER_extract in Embedded Media Field 6

Same name and namespace in other branches
  1. 6.3 hooks/emfield.php \EMMODULE_PROVIDER_extract()
  2. 6.2 hooks/emfield.php \EMMODULE_PROVIDER_extract()

Parse the URL or embed code provided by an editor.

Parameters

$embed: The raw URL or embed code pasted into the text field by the editor. @param $field The field data for the emvideo, emaudio, etc. @return If the hook returns a non-empty string, then it is assumed to have been parsed and matched by this provider. If the hook returns an array of strings, then each string is assumed to be a regex pattern, and will be checked for a match in turn. Otherwise, it is assumed there is no match.

File

hooks/emfield.php, line 81
Document various hooks for Embedded Media Field.

Code

function EMMODULE_PROVIDER_extract($embed, $field) {
  return array(
    '@example\\.com/video/(*+)@i',
    '@example\\.com/rss/video/(*+)@i',
  );
}