You are here

function mee_extract_copyrights in Scald: Media Management made easy 6

Same name and namespace in other branches
  1. 7 modules/fields/mee/mee.module \mee_extract_copyrights()

Extract all copyright informations from a string.

1 call to mee_extract_copyrights()
mee_field in mee/mee.module
Implementation of hook_field().

File

mee/mee.module, line 693
Defines a special textarea, with drag and drop media driven by Scald and dnd.module when rich text editing is enabled on the textarea via the WYSIWYG API.

Code

function mee_extract_copyrights($string) {
  $copyrights = array();
  if (preg_match_all(MEE_RENDERED_COPYRIGHT_PATTERN, $string, $matches)) {
    foreach ($matches[1] as $key => $sid) {
      $copyrights[$sid] = $matches[2][$key];
    }
  }
  return $copyrights;
}