function media_set_browser_params

cis7 media_set_browser_params()
cle7 media_set_browser_params()
elmsmedia7 media_set_browser_params()
icor7 media_set_browser_params()
meedjum_blog7 media_set_browser_params()
mooc7 media_set_browser_params()

Provides a singleton of the params passed to the media browser.

This is useful in situations like form alters because callers can pass id="wysiywg_form" or whatever they want, and a form alter could pick this up. We may want to change the hook_media_browser_plugin_view() implementations to use this function instead of being passed params for consistency.

It also offers a chance for some meddler to meddle with them.

See also


2 calls to media_set_browser_params()
media_browser in sites/all/modules/ulmus/media/includes/
Media browser page callback.
media_get_browser_params in sites/all/modules/ulmus/media/includes/
For sanity in grammar.


sites/all/modules/ulmus/media/includes/, line 192
Summon plugins and render the media browser.


function media_set_browser_params() {
  $params = &drupal_static(__FUNCTION__, array());

  if (empty($params)) {
    // Build out browser settings. Permissions- and security-related behaviors
    // should not rely on these parameters, since they come from the HTTP query.
    // @TODO make sure we treat parameters as user input.
    $params = drupal_get_query_parameters() + array(
      'types' => array(),
      'multiselect' => FALSE,

    // Transform text 'true' and 'false' to actual booleans.
    foreach ($params as $k => $v) {
      if ($v === 'true') {
        $params[$k] = TRUE;
      elseif ($v === 'false') {
        $params[$k] = FALSE;

    array_walk_recursive($params, 'media_recursive_check_plain');

    // Allow modules to alter the parameters.
    drupal_alter('media_browser_params', $params);

  return $params;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.