You are here

function bynder_parse_facet_link in Bynder 7

Parse the facet link.

File

includes/bynder.browser.inc, line 622
Manages the Bynder media browser functionality

Code

function bynder_parse_facet_link($query) {
  $pattern = '/\\+\\([A-Za-z0-9 ]*\\)/';
  preg_match($pattern, $query, $matches);
  $query = urlencode($query);
  if (!empty($matches)) {
    $query = $query . '&search=' . substr(trim($matches[0]), 2, -1);
  }
  return $query;
}