You are here

function imagepicker_strip_messages in Image Picker 7

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_strip_messages()
  2. 5 imagepicker.module \imagepicker_strip_messages()
  3. 6.2 imagepicker.functions.inc \imagepicker_strip_messages()

Parameters

$msg:

Return value

string

1 call to imagepicker_strip_messages()
template_preprocess_imagepicker in ./imagepicker.module

File

./imagepicker.functions.inc, line 315
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function imagepicker_strip_messages($msg) {
  if ($msg) {
    $dirsep = DIRECTORY_SEPARATOR == '\\' ? '\\\\' : '\\/';
    $pattern = '/<li>.*' . $dirsep . 'imagepicker' . $dirsep . '.*<\\/li>/i';
    $msg = preg_replace($pattern, '', $msg);
  }
  return $msg;
}