You are here

function dnd_suppress_library in Scald: Media Management made easy 6

Same name and namespace in other branches
  1. 7 modules/library/dnd/dnd.module \dnd_suppress_library()

Tells DnD that the library shouldn't be displayed on this page.

This function should be called whenever the library shouldn't be displayed.

Parameters

boolean $set: If FALSE, no change to the suppression status will be done, allowing other functions to query the suppression state. Defaults to TRUE.

Return value

boolean TRUE if the library output has been suppressed, FALSE otherwise.

File

dnd/dnd.module, line 143

Code

function dnd_suppress_library($set = TRUE) {
  static $suppress = FALSE;
  if ($set && !$suppress) {
    $suppress = TRUE;
    drupal_add_js(array(
      'dnd' => array(
        'suppress' => 1,
      ),
    ), 'setting');
  }
  return $suppress;
}