You are here

function popups_skins in Popups API (Ajax Dialogs) 6.2

Retrieve all information from the popup skin registry.

Parameters

$reset: (optional) If TRUE, will force the the skin registry to reset.

See also

popups_popups_skins

2 calls to popups_skins()
popups_add_popups in ./popups.module
Attach the popup behavior to the page.
popups_admin_settings in ./popups.module
Form for the Popups Settings page.

File

./popups.module, line 350
This module provides a hook_popups for links to be opened in an Ajax Popup Modal Dialog.

Code

function popups_skins($reset = FALSE) {
  static $skins = array();
  if (empty($skins) || $reset) {
    if (!$reset && ($cache = cache_get('popups:skins')) && !empty($cache->data)) {
      $skins = $cache->data;
    }
    else {

      // Create the popup skin registry (hook_popups_skins) and cache it.
      $skins = module_invoke_all('popups_skins');
      ksort($skins);

      // Sort them alphabetically
      cache_set('popups:skins', $skins, 'cache', CACHE_PERMANENT);
    }
  }
  return $skins;
}